dp3.task_processing.task_hooks ¶
TaskGenericHooksContainer ¶
Container for generic hooks
Possible hooks:
on_task_start
: receives Task, no return value requirements
Source code in dp3/task_processing/task_hooks.py
TaskEntityHooksContainer ¶
TaskEntityHooksContainer(entity: str, model_spec: ModelSpec, log: logging.Logger, elog: EventGroupType)
Container for entity hooks
Possible hooks:
allow_entity_creation
: receives eid and Task, may prevent entity record creation (by returning False)on_entity_creation
: receives eid and Task, may return list of DataPointTasks
Source code in dp3/task_processing/task_hooks.py
TaskAttrHooksContainer ¶
TaskAttrHooksContainer(entity: str, attr: str, attr_type: AttrType, model_spec: ModelSpec, log: logging.Logger, elog: EventGroupType)
Container for attribute hooks
Possible hooks:
on_new_plain
,on_new_observation
,on_new_ts_chunk
: receives eid and DataPointBase, may return a list of DataPointTasks