noc.core.datastream.decorator

Module Contents

noc.core.datastream.decorator.datastream(cls)
Class decorator to track model changes to datastream

Usage

@datastream class MyModel(Model):

… def iter_changed_datastream(self, changed_fields=None):

yield <datastream name>, <object id> … yield <datastream name>, <object id>
noc.core.datastream.decorator._on_model_change(sender, instance, *args, **kwargs)
noc.core.datastream.decorator._on_document_change(sender, document, *args, **kwargs)
noc.core.datastream.decorator._on_change(obj, changed_fields=None)