Coverage for gwcelery/igwn_alert/__init__.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2024-11-14 05:52 +0000

1"""Embed a :doc:`comet:index` LVAlert listener into a Celery worker by 

2:doc:`extending Celery with bootsteps <celery:userguide/extending>`. 

3""" 

4from click import Option 

5 

6from .bootsteps import Receiver 

7 

8 

9def install(app): 

10 """Register the LVAlert subsystem in the application boot steps.""" 

11 app.steps['consumer'] |= {Receiver} 

12 app.user_options['worker'].add(Option(('--igwn-alert',), 

13 is_flag=True, 

14 help='Enable IGWN Alert receiver'))