Download 3.0 PDF - Read the Docs
Transcript
Celery Documentation, Release 3.0.25 • logfile – The logfile used by the task. execute_using_pool(pool, **kwargs) Like execute(), but using a worker pool. Parameters pool – A celery.concurrency.base.TaskPool instance. Raises celery.exceptions.TaskRevokedError if the task was revoked and ignored. expires extend_with_default_kwargs() 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. classmethod from_message(message, body, **kwargs) hostname id ignored_msg = ‘ Task %(name)s[%(id)s] ignored\n ‘ info(safe=False) internal_error_msg = ‘ Task %(name)s[%(id)s] INTERNAL ERROR: %(exc)s\n ‘ Format string used to log internal error. kwargs maybe_expire() If expired, mark the task as revoked. name on_accepted(pid, time_accepted) Handler called when task is accepted by worker pool. on_ack on_failure(exc_info) Handler called if the task raised an exception. on_retry(exc_info) Handler called if the task should be retried. on_success(ret_value, now=None) Handler called if the task was successfully processed. on_timeout(soft, timeout) Handler called if the task times out. repr_result(result, maxlen=46) request_dict retry_msg = ‘Task %(name)s[%(id)s] retry: %(exc)s’ Format string used to log task retry. revoked() If revoked, skip task and mark state. send_event(type, **fields) 2.14. Internals 327