EVECelery#
Subpackages#
EVECelery.clientsEVECelery.exceptionsEVECelery.tasksEVECelery.tasks.BaseTasksEVECelery.tasks.ESIEVECelery.tasks.ESI.AllianceEVECelery.tasks.ESI.AssetsEVECelery.tasks.ESI.BookmarksEVECelery.tasks.ESI.CalendarEVECelery.tasks.ESI.CharacterEVECelery.tasks.ESI.ClonesEVECelery.tasks.ESI.ContactsEVECelery.tasks.ESI.ContractsEVECelery.tasks.ESI.CorporationEVECelery.tasks.ESI.DogmaEVECelery.tasks.ESI.FactionWarfareEVECelery.tasks.ESI.FittingsEVECelery.tasks.ESI.FleetsEVECelery.tasks.ESI.IncursionsEVECelery.tasks.ESI.IndustryEVECelery.tasks.ESI.InsuranceEVECelery.tasks.ESI.KillmailsEVECelery.tasks.ESI.LocationEVECelery.tasks.ESI.LoyaltyEVECelery.tasks.ESI.MailEVECelery.tasks.ESI.MarketEVECelery.tasks.ESI.OpportunitiesEVECelery.tasks.ESI.PlanetaryInteractionEVECelery.tasks.ESI.RoutesEVECelery.tasks.ESI.SearchEVECelery.tasks.ESI.SkillsEVECelery.tasks.ESI.SovereigntyEVECelery.tasks.ESI.StatusEVECelery.tasks.ESI.UniverseEVECelery.tasks.ESI.UserInterfaceEVECelery.tasks.ESI.WalletEVECelery.tasks.ESI.WarsEVECelery.tasks.ESI.TaskDirectory
EVECelery.tasks.SamplesEVECelery.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.EVECeleryWorkerCelery 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