This document describes the current stable version of Celery (5.0). For development docs, go here.
celery.worker.request¶
Task request.
This module defines the Request class, that specifies
how tasks are executed.
-
class
celery.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¶
-
property
app¶
-
property
args¶
-
property
argsrepr¶
-
property
body¶
-
property
connection_errors¶
-
property
content_encoding¶
-
property
content_type¶
-
property
correlation_id¶
-
property
delivery_info¶
-
property
eta¶
-
property
eventer¶
-
execute(loglevel=None, logfile=None)[source]¶ Execute the task in a
trace_task().- Parameters
loglevel (int) – The loglevel used by the task.
logfile (str) – The logfile used by the task.
-
execute_using_pool(pool, **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.
-
property
expires¶
-
property
hostname¶
-
id¶
-
property
kwargs¶
-
property
kwargsrepr¶
-
property
message¶
-
name¶
-
property
on_ack¶
-
on_failure(exc_info, send_failed_event=True, return_ok=False)[source]¶ Handler called if the task raised an exception.
-
property
on_reject¶
-
on_success(failed__retval__runtime, **kwargs)[source]¶ Handler called if the task was successfully processed.
-
property
parent_id¶
-
property
reply_to¶
-
property
request_dict¶
-
property
root_id¶
-
property
store_errors¶
-
property
task¶
-
property
task_id¶
-
property
task_name¶
-
time_limits= (None, None)¶
-
time_start= None¶
-
property
type¶
-
property
tzlocal¶
-
property
utc¶
-
worker_pid= None¶
-