Models¶
- class tom_alerts.models.BrokerQuery(*args, **kwargs)¶
Class representing a query to a broker in a TOM
- Parameters:
name (str) – The user-given name of this query.
broker (str) – The name of the broker–this should come directly from the
name
attribute of the broker class representing the broker.parameters (dict) – Parameters for this
BrokerQuery
, stored as a JSON string.created (datetime) – The time at which this
BrokerQuery
was created in the TOM database.modified (datetime) – The time at which this
BrokerQuery
was changed in the TOM database.last_run (datetime) – The time at which this
BrokerQuery
was last run against its corresponding broker.
- class tom_alerts.models.AlertStreamMessage(*args, **kwargs)¶
Class representing a streaming message containing data sent/received either over Kafka or to/from another TOM :param topic: The destination or source of sharing for the message. :type topic: str
- Parameters:
message_id (str) – An external message identifier that can be used to locate the message within the given topic.
date_shared (datetime) – The date on which the message is shared. (Date created by default.)
exchange_status (str) – Whether this message was sent or received.