:py:mod:`EVECelery` =================== .. py:module:: EVECelery Subpackages ----------- .. toctree:: :titlesonly: :maxdepth: 3 clients/index.rst exceptions/index.rst tasks/index.rst utils/index.rst Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 EVECeleryBeatScheduler/index.rst EVECeleryWorker/index.rst __main__/index.rst __version__/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: EVECelery.EVECeleryWorker EVECelery.EVECeleryBeatScheduler Attributes ~~~~~~~~~~ .. autoapisummary:: EVECelery.__author_email__ EVECelery.__description__ EVECelery.__license__ EVECelery.__title__ EVECelery.__url__ EVECelery.__version__ .. py:data:: __author_email__ :value: 'maintainers@nullsec.space' .. py:data:: __description__ :value: 'Task queue framework for building tools that interact with the EVE Online ESI API using Celery,...' .. py:data:: __license__ :value: 'MIT License' .. py:data:: __title__ :value: 'EVECelery' .. py:data:: __url__ :value: 'https://github.com/NullsecSpace/EVECelery' .. py:data:: __version__ :value: '0.20' .. py:class:: EVECeleryWorker(broker_user: Optional[str] = None, broker_password: Optional[str] = None, broker_host: Optional[str] = None, broker_port: Optional[int] = None, broker_vhost: Optional[str] = None, result_user: Optional[str] = None, result_password: Optional[str] = None, result_host: Optional[str] = None, result_port: Optional[int] = None, result_db: Optional[int] = None, queue_prefix: str = 'EVECelery.', worker_log_level: Optional[str] = 'ERROR', connection_check: bool = False) Celery worker server wrapper. Creating an instance of this class creates a celery app and registers the default tasks. :param broker_user: RabbitMQ user :param broker_password: RabbitMQ password :param broker_host: RabbitMQ hostname :param broker_port: RabbitMQ port - normally 5672 :param broker_vhost: RabbitMQ vhost - namespace for all EVECelery queues :param result_user: Redis user - normally "default" if not explicitly configured :param result_password: Redis password :param result_host: Redis hostname :param result_port: Redis port - normally 6379 :param result_db: Redis db - normally 0 for the default db :param queue_prefix: Prefix to add to all generated ESI queue names :param worker_log_level: The Celery worker log level for console output .. py:property:: tasks :type: EVECelery.tasks.TaskDirectory .. py:method:: celery_config() -> dict .. py:method:: _register_all_tasks() Register all subtasks that inherit from BaseTask This method will register and initialize all subtasks that inherit from BaseTask. .. py:method:: register_additional_queue(queue: str) Register an additional queue that this Celery app should process. :param queue: Name of the queue :return: None .. py:method:: register_task_route(task_name: str, queue_name: str) Register a task to a specific queue using a Celery task route. :param task_name: The name of the task :param queue_name: Name of the queue to route tasks to. :return: None .. py:method:: register_task(task: celery.Task) Register a task instance with the Celery app. A task must inherit from the Celery Task base class. :param task: A task instance :return: None .. py:method:: print_header() :classmethod: .. py:method:: start() Starts the Celery app and beings processing messages in the queues. :return: None .. py:class:: EVECeleryBeatScheduler(broker_user: Optional[str] = None, broker_password: Optional[str] = None, broker_host: Optional[str] = None, broker_port: Optional[int] = None, broker_vhost: Optional[str] = None, result_user: Optional[str] = None, result_password: Optional[str] = None, result_host: Optional[str] = None, result_port: Optional[int] = None, result_db: Optional[int] = None, queue_prefix: str = 'EVECelery.', worker_log_level: Optional[str] = 'ERROR', connection_check: bool = False) Bases: :py:obj:`EVECelery.EVECeleryWorker.EVECeleryWorker` Celery beat scheduler for periodic tasks. .. py:method:: schedule_task(schedule_name: str, schedule_config: dict) Schedule a task to run at intervals. The passed in schedule object is a dictionary following the format and fields described here: https://docs.celeryproject.org/en/stable/userguide/periodic-tasks.html#available-fields :param schedule_name: Name of the scheduled job. This must be unique. :param schedule_config: The scheduled job config as specified at https://docs.celeryproject.org/en/stable/userguide/periodic-tasks.html#available-fields :return: None .. py:method:: start() Starts the Celery app and beings processing messages in the queues. :return: None