gwcelery.lvalert module

Embed a Comet LVAlert listener into a Celery worker by extending Celery with bootsteps.


Register the LVAlert subsystem in the application boot steps.

gwcelery.lvalert.bootsteps module

class gwcelery.lvalert.bootsteps.Receiver(consumer, lvalert=False, **kwargs)[source]

Bases: gwcelery.lvalert.bootsteps.LVAlertBootStep

Run the global LVAlert receiver in background thread.

name = 'LVAlert client'

Create the step.


gwcelery.lvalert.signals module

Definitions of custom Celery signals related to VOEvents.

These signals allow us to keep the VOEvent broker code decoupled from any GCN-specific logic. Notably, it allows us to keep all of the details of the GCN-specific “Notice Type” concept out of gwcelery.voevent.

gwcelery.lvalert.signals.lvalert_received = <Signal: lvalert_received providing_args={'payload', 'node'}>

Fired whenever a VOEvent is received.

Parameters:xml_document (comet.utility.xml.xml_document) – The XML document that was received. The raw file contents are available as xml_document.raw_bytes. The lxml.etree representation of the document is available as xml_document.element.