This document describes the current stable version of Celery (3.1). For development docs, go here.
celery.worker.job¶
celery.worker.job¶
This module defines the Request class,
which specifies how tasks are executed.
-
class
celery.worker.job.Request(body, on_ack=<function noop>, hostname=None, eventer=None, app=None, connection_errors=None, request_dict=None, message=None, task=None, on_reject=<function noop>, **opts)[source]¶ A request for task execution.
-
acknowledged¶
-
app¶
-
args¶
-
connection_errors¶
-
correlation_id¶
-
delivery_info¶
-
error_msg= u' Task %(name)s[%(id)s] %(description)s: %(exc)s\n '¶ Format string used to log task failure.
-
eta¶
-
eventer¶
-
execute(loglevel=None, logfile=None)[source]¶ Execute the task in a
trace_task().Parameters: - loglevel – The loglevel used by the task.
- logfile – 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 – A celery.concurrency.base.TaskPoolinstance.Raises: celery.exceptions.TaskRevokedError – if the task was revoked and ignored.
-
expires¶
-
extend_with_default_kwargs()[source]¶ Extend the tasks keyword arguments with standard task arguments.
Currently these are logfile, loglevel, task_id, task_name, task_retries, and delivery_info.
See
celery.task.base.Task.run()for more information.Magic keyword arguments are deprecated and will be removed in version 4.0.
-
hostname¶
-
id¶
-
ignored_msg= u' Task %(name)s[%(id)s] %(description)s\n '¶
-
internal_error_msg= u' Task %(name)s[%(id)s] %(description)s: %(exc)s\n '¶ Format string used to log internal error.
-
kwargs¶
-
name¶
-
on_ack¶
-
on_reject¶
-
on_success(ret_value, now=None, nowfun=<function _monotonic>)[source]¶ Handler called if the task was successfully processed.
-
rejected_msg= u' Task %(name)s[%(id)s] %(exc)s\n '¶
-
reply_to¶
-
request_dict¶
-
retry_msg= u'Task %(name)s[%(id)s] retry: %(exc)s'¶ Format string used to log task retry.
-
shortinfo()¶
-
store_errors¶
-
success_msg= u' Task %(name)s[%(id)s] succeeded in %(runtime)ss: %(return_value)s\n '¶ Format string used to log task success.
-
task¶
-
task_id¶
-
task_name¶
-
time_start¶
-
tzlocal¶
-
utc¶
-
worker_pid¶
-