Celery 1.0.6 (stable) documentation

This Page

Django Model Managers - celery.managers

class celery.managers.TaskManager

Manager for celery.models.Task models.

get_task(*args, **kwargs)

Get task meta for task by task_id.

Parameters:exception_retry_count – How many times to retry by transaction rollback on exception. This could theoretically happen in a race condition if another worker is trying to create the same task. The default is to retry once.
store_result(*args, **kwargs)

Store the result and status of a task.

Parameters:
  • task_id – task id
  • result – The return value of the task, or an exception instance raised by the task.
  • status – Task status. See celery.result.AsyncResult.get_status() for a list of possible status values.
  • traceback – The traceback at the point of exception (if the task failed).
  • exception_retry_count – How many times to retry by transaction rollback on exception. This could theoretically happen in a race condition if another worker is trying to create the same task. The default is to retry twice.
class celery.managers.TaskSetManager

Manager for celery.models.TaskSet models.

restore_taskset(*args, **kwargs)

Get taskset meta for task by taskset_id.

store_result(*args, **kwargs)

Store the result of a taskset.

Parameters:
  • taskset_id – task set id
  • result – The return value of the taskset
celery.managers.transaction_retry(max_retries=1)

Decorator for methods doing database operations.

If the database operation fails, it will retry the operation at most max_retries times.