10.6.19. Class cerebro.events.BeforeEventCreationOfTask¶
-
class
cerebro.events.BeforeEventCreationOfTask(event_type, event_id)[source]¶ Bases:
cerebro.events.Event,cerebro.aclasses.TaskThe class for the task creation event. It grants access to the data of the new task before writing it into the database.
Methods
definition()methods of the base class cerebro.aclasses.Taskmethods of the base class cerebro.events.Event
The class object is input into the functions
before_eventanderror_event(in case of error) of the module event.def before_event(event): if event.event_type() == event.EVENT_CREATION_OF_TASK: ...
See also
-
definition()[source]¶ Returns: a new message of the "Definition" type.Return type: cerebro.events.BeforeEventCreationOfMessageAlongside with creation of a new task, a new Definition message is being created also, that’s why the task creation event handles the Definition creation as well.
if event.event_type() == event.EVENT_CREATION_OF_TASK: message = event.definition() ...