This document describes the current stable version of Celery (5.2). For development docs, go here.
celery.worker
¶
Worker implementation.
- class celery.worker.WorkController(app=None, hostname=None, **kwargs)[source]¶
Unmanaged worker instance.
- class Blueprint(steps=None, name=None, on_start=None, on_close=None, on_stopped=None)[source]¶
Worker bootstep blueprint.
- default_steps = {'celery.worker.autoscale:WorkerComponent', 'celery.worker.components:Beat', 'celery.worker.components:Consumer', 'celery.worker.components:Hub', 'celery.worker.components:Pool', 'celery.worker.components:StateDB', 'celery.worker.components:Timer'}¶
- name = 'Worker'¶
- app = None¶
- blueprint = None¶
- exitcode = None¶
contains the exit code if a
SystemExit
event is handled.
- pidlock = None¶
- pool = None¶
- semaphore = None¶
- setup_defaults(concurrency=None, loglevel='WARN', logfile=None, task_events=None, pool=None, consumer_cls=None, timer_cls=None, timer_precision=None, autoscaler_cls=None, pool_putlocks=None, pool_restarts=None, optimization=None, O=None, statedb=None, time_limit=None, soft_time_limit=None, scheduler=None, pool_cls=None, state_db=None, task_time_limit=None, task_soft_time_limit=None, scheduler_cls=None, schedule_filename=None, max_tasks_per_child=None, prefetch_multiplier=None, disable_rate_limits=None, worker_lost_wait=None, max_memory_per_child=None, **_kw)[source]¶
- setup_instance(queues=None, ready_callback=None, pidfile=None, include=None, use_eventloop=None, exclude_queues=None, **kwargs)[source]¶
- property state¶