dragonfly.implementations.alert_spammer module

Some template vars

Members: AlertSpammer Functions: Classes:

Spammer of Alerts

Summary

class dragonfly.implementations.alert_spammer.AlertSpammer(broker=None, sleep_time=10, *args, **kwargs)

Bases: dragonfly.implementations.alert_spammer.AlertSpammer

Spammer of alerts to alerts exchange

Keyword Arguments:
 
  • broker (str) – the AMQP url to connect with
  • sleep_time (int) – seconds to sleep between alerts
  • name (str) – unique identifier across all dripline services (used to determine routing key)
  • calibration (str||dict) – string use to process raw get result (with .format(raw)) or a dict to use for the same purpose where raw must be a key
  • get_on_set (bool) – flag to toggle running ‘on_get’ after each ‘on_set’

broker (str): the AMQP url to connect with sleep_time (int): seconds to sleep between alerts

handle_request(channel, method, properties, request)
is_locked
lock(lockout_key=None, *args, **kwargs)
lockout_key
on_cmd(*args, **kwargs)

WARNING! if you override this method, you must ensure you deal with lockout properly

on_config(attribute, value=None)

configure a property again

WARNING! if you override this method, you must ensure you deal with lockout properly

ping(*args, **kwargs)

ignore all details and respond with an empty message

set_condition(*args, **kwargs)

To actually do something inside a class, the set_condition should be implemented in the class itself.

spam()

sends alerts to alerts exchange at regular time intervals

unlock(*args, **kwargs)

End of modules condition

Data:

End of data condition