10.6.8. Class cerebro.events.AfterEventMessage¶
-
class
cerebro.events.AfterEventMessage(event_type, event_id)[source]¶ Bases:
cerebro.events.Event,cerebro.aclasses.MessageThe base class for the task creation/change event. It grants access to the data of a created/modified message after it is written into the database.
Methods
new_attachments()resources()methods of the base class cerebro.aclasses.Messagemethods of the base class cerebro.events.Event
See also
-
new_attachments()[source]¶ Returns: a list of new attachments to the message. Return type: list( cerebro.aclasses.AbstractAttachment,)
-
resources()[source]¶ Returns: a list of resources being reported for. Return type: list(tuple,) - [(resource_id, resource_name),] - a list of tuples consisting of two fields: a resource ID and a resource name. Resources are available in the
"Resource Report" typeonly. If themessage typeis not the “Resource Report”, “None” is being returned.if event.type() == event.TYPE_RESOURCE_REPORT: print('resources()', event.resources())