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)[исходный код]¶
A request for task execution.
- acknowledge()[исходный код]¶
Acknowledge task.
- acknowledged = False¶
- property app¶
- property args¶
- property argsrepr¶
- property body¶
- cancel(pool, signal=None)[исходный код]¶
- property chord¶
- property connection_errors¶
- property content_encoding¶
- property content_type¶
- property correlation_id¶
- property delivery_info¶
- property errbacks¶
- property eta¶
- property eventer¶
- execute(loglevel=None, logfile=None)[исходный код]¶
Execute the task in a
trace_task()
.
- execute_using_pool(pool: BasePool, **kwargs)[исходный код]¶
Used by the worker to send this task to the pool.
- Параметры:
pool (TaskPool) – The execution pool used to execute this request.
- Исключение:
celery.exceptions.TaskRevokedError – if the task was revoked.
- property expires¶
- property group¶
- property group_index¶
- property groups¶
- property hostname¶
- humaninfo()[исходный код]¶
- id¶
- property ignore_result¶
- info(safe=False)[исходный код]¶
- property kwargs¶
- property kwargsrepr¶
- maybe_expire()[исходный код]¶
If expired, mark the task as revoked.
- property message¶
- name¶
- on_accepted(pid, time_accepted)[исходный код]¶
Handler called when task is accepted by worker pool.
- property on_ack¶
- on_failure(exc_info, send_failed_event=True, return_ok=False)[исходный код]¶
Handler called if the task raised an exception.
- property on_reject¶
- on_retry(exc_info)[исходный код]¶
Handler called if the task should be retried.
- on_success(failed__retval__runtime, **kwargs)[исходный код]¶
Handler called if the task was successfully processed.
- on_timeout(soft, timeout)[исходный код]¶
Handler called if the task times out.
- property parent_id¶
- reject(requeue=False)[исходный код]¶
- property replaced_task_nesting¶
- property reply_to¶
- property request_dict¶
- revoked()[исходный код]¶
If revoked, skip task and mark state.
- property root_id¶
- send_event(type, **fields)[исходный код]¶
- property store_errors¶
- property task¶
- property task_id¶
- property task_name¶
- terminate(pool, signal=None)[исходный код]¶
- time_limits = (None, None)¶
- time_start = None¶
- property type¶
- property tzlocal¶
- property utc¶
- worker_pid = None¶