Coverage for gwcelery/email/__init__.py: 100%
5 statements
« prev ^ index » next coverage.py v7.4.4, created at 2024-11-14 05:52 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2024-11-14 05:52 +0000
1"""Embed an IMAP email client into a Celery worker by :doc:`extending Celery
2with bootsteps <celery:userguide/extending>`.
3"""
4from click import Option
6from .bootsteps import Receiver
9def install(app):
10 """Register the email client subsystem in the application boot steps."""
11 app.steps['consumer'] |= {Receiver}
12 app.user_options['worker'].add(Option(('--email',),
13 is_flag=True,
14 help='Enable email client'))