EVECelery
#
Subpackages#
EVECelery.clients
EVECelery.exceptions
EVECelery.tasks
EVECelery.tasks.BaseTasks
EVECelery.tasks.ESI
EVECelery.tasks.ESI.Alliance
EVECelery.tasks.ESI.Assets
EVECelery.tasks.ESI.Bookmarks
EVECelery.tasks.ESI.Calendar
EVECelery.tasks.ESI.Character
EVECelery.tasks.ESI.Clones
EVECelery.tasks.ESI.Contacts
EVECelery.tasks.ESI.Contracts
EVECelery.tasks.ESI.Corporation
EVECelery.tasks.ESI.Dogma
EVECelery.tasks.ESI.FactionWarfare
EVECelery.tasks.ESI.Fittings
EVECelery.tasks.ESI.Fleets
EVECelery.tasks.ESI.Incursions
EVECelery.tasks.ESI.Industry
EVECelery.tasks.ESI.Insurance
EVECelery.tasks.ESI.Killmails
EVECelery.tasks.ESI.Location
EVECelery.tasks.ESI.Loyalty
EVECelery.tasks.ESI.Mail
EVECelery.tasks.ESI.Market
EVECelery.tasks.ESI.Opportunities
EVECelery.tasks.ESI.PlanetaryInteraction
EVECelery.tasks.ESI.Routes
EVECelery.tasks.ESI.Search
EVECelery.tasks.ESI.Skills
EVECelery.tasks.ESI.Sovereignty
EVECelery.tasks.ESI.Status
EVECelery.tasks.ESI.Universe
EVECelery.tasks.ESI.UserInterface
EVECelery.tasks.ESI.Wallet
EVECelery.tasks.ESI.Wars
EVECelery.tasks.ESI.TaskDirectory
EVECelery.tasks.Samples
EVECelery.tasks.TaskDirectory
EVECelery.utils
Submodules#
Package Contents#
Classes#
Celery worker server wrapper. |
|
Attributes#
- EVECelery.__author_email__ = 'maintainers@nullsec.space'#
- EVECelery.__description__ = 'Task queue framework for building tools that interact with the EVE Online ESI API using Celery,...'#
- EVECelery.__license__ = 'MIT License'#
- EVECelery.__title__ = 'EVECelery'#
- EVECelery.__url__ = 'https://github.com/NullsecSpace/EVECelery'#
- EVECelery.__version__ = '0.20'#
- class EVECelery.EVECeleryWorker(broker_user: str | None = None, broker_password: str | None = None, broker_host: str | None = None, broker_port: int | None = None, broker_vhost: str | None = None, result_user: str | None = None, result_password: str | None = None, result_host: str | None = None, result_port: int | None = None, result_db: int | None = None, queue_prefix: str = 'EVECelery.', worker_log_level: str | None = 'ERROR', connection_check: bool = False)#
Celery worker server wrapper. Creating an instance of this class creates a celery app and registers the default tasks.
- Parameters:
broker_user (Optional[str]) – RabbitMQ user
broker_password (Optional[str]) – RabbitMQ password
broker_host (Optional[str]) – RabbitMQ hostname
broker_port (Optional[int]) – RabbitMQ port - normally 5672
broker_vhost (Optional[str]) – RabbitMQ vhost - namespace for all EVECelery queues
result_user (Optional[str]) – Redis user - normally “default” if not explicitly configured
result_password (Optional[str]) – Redis password
result_host (Optional[str]) – Redis hostname
result_port (Optional[int]) – Redis port - normally 6379
result_db (Optional[int]) – Redis db - normally 0 for the default db
queue_prefix (str) – Prefix to add to all generated ESI queue names
worker_log_level (Optional[str]) – The Celery worker log level for console output
connection_check (bool) –
- property tasks: EVECelery.tasks.TaskDirectory#
- Return type:
- celery_config() dict #
- Return type:
dict
- _register_all_tasks()#
Register all subtasks that inherit from BaseTask
This method will register and initialize all subtasks that inherit from BaseTask.
- register_additional_queue(queue: str)#
Register an additional queue that this Celery app should process.
- Parameters:
queue (str) – Name of the queue
- Returns:
None
- register_task_route(task_name: str, queue_name: str)#
Register a task to a specific queue using a Celery task route.
- Parameters:
task_name (str) – The name of the task
queue_name (str) – Name of the queue to route tasks to.
- Returns:
None
- register_task(task: celery.Task)#
Register a task instance with the Celery app. A task must inherit from the Celery Task base class.
- Parameters:
task (celery.Task) – A task instance
- Returns:
None
- classmethod print_header()#
- start()#
Starts the Celery app and beings processing messages in the queues.
- Returns:
None
- class EVECelery.EVECeleryBeatScheduler(broker_user: str | None = None, broker_password: str | None = None, broker_host: str | None = None, broker_port: int | None = None, broker_vhost: str | None = None, result_user: str | None = None, result_password: str | None = None, result_host: str | None = None, result_port: int | None = None, result_db: int | None = None, queue_prefix: str = 'EVECelery.', worker_log_level: str | None = 'ERROR', connection_check: bool = False)#
Bases:
EVECelery.EVECeleryWorker.EVECeleryWorker
Celery beat scheduler for periodic tasks.
- Parameters:
broker_user (Optional[str]) –
broker_password (Optional[str]) –
broker_host (Optional[str]) –
broker_port (Optional[int]) –
broker_vhost (Optional[str]) –
result_user (Optional[str]) –
result_password (Optional[str]) –
result_host (Optional[str]) –
result_port (Optional[int]) –
result_db (Optional[int]) –
queue_prefix (str) –
worker_log_level (Optional[str]) –
connection_check (bool) –
- 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
- Parameters:
schedule_name (str) – Name of the scheduled job. This must be unique.
schedule_config (dict) – The scheduled job config as specified at https://docs.celeryproject.org/en/stable/userguide/periodic-tasks.html#available-fields
- Returns:
None
- start()#
Starts the Celery app and beings processing messages in the queues.
- Returns:
None