This document describes the current stable version of Celery (5.6). For development docs, go here.
celery.worker.request¶
Task request.
This module defines the Request class, that specifies
how tasks are executed.
- classcelery.worker.request.Request(message, on_ack=<function noop>, hostname=None, eventer=None, app=None, connection_errors=None, request_dict=None, task=None, on_reject=<function noop>, body=None, headers=None, decoded=False, utc=True, maybe_make_aware=<function maybe_make_aware>, maybe_iso8601=<function maybe_iso8601>, **opts)[source] ¶
A request for task execution.
- acknowledged=False¶
- propertyapp¶
- propertyargs¶
- propertyargsrepr¶
- propertybody¶
- propertychord¶
- propertyconnection_errors¶
- propertycontent_encoding¶
- propertycontent_type¶
- propertycorrelation_id¶
- propertydelivery_info¶
- propertyerrbacks¶
- propertyeta¶
- propertyeventer¶
- execute(loglevel=None, logfile=None)[source] ¶
Execute the task in a
trace_task().
- execute_using_pool(pool:BasePool , **kwargs)[source] ¶
Used by the worker to send this task to the pool.
- Parameters:
pool (TaskPool) – The execution pool used to execute this request.
- Raises:
celery.exceptions.TaskRevokedError – if the task was revoked.
- propertyexpires¶
- propertygroup¶
- propertygroup_index¶
- propertygroups¶
- propertyhostname¶
- id¶
- propertyignore_result¶
- propertykwargs¶
- propertykwargsrepr¶
- propertymessage¶
- name¶
- propertyon_ack¶
- on_failure(exc_info, send_failed_event=True, return_ok=False)[source] ¶
Handler called if the task raised an exception.
- propertyon_reject¶
- on_success(failed__retval__runtime, **kwargs)[source] ¶
Handler called if the task was successfully processed.
- propertyparent_id¶
- propertyreplaced_task_nesting¶
- propertyreply_to¶
- propertyrequest_dict¶
- propertyroot_id¶
- propertystore_errors¶
- propertytask¶
- propertytask_id¶
- propertytask_name¶
- time_limits=(None, None)¶
- time_start=None¶
- propertytype¶
- propertytzlocal¶
- propertyutc¶
- worker_pid=None¶