Celery 3.1 now supports Django out of the box, please see the new tutorial
Managers - djcelery.managers¶
-
class
djcelery.managers.
ExtendedManager
¶ -
connection_for_read
()¶
-
connection_for_write
()¶
-
current_engine
()¶
-
get_query_set
()¶
-
get_queryset
()¶
-
update_or_create
(**kwargs)¶
-
-
class
djcelery.managers.
ExtendedQuerySet
(model=None, query=None, using=None, hints=None)¶ -
update_or_create
(**kwargs)¶
-
-
class
djcelery.managers.
ResultManager
¶ -
delete_expired
(expires)¶ Delete all expired taskset results.
-
get_all_expired
(expires)¶ Get all expired task results.
-
-
class
djcelery.managers.
TaskManager
¶ Manager for
celery.models.Task
models.-
get_task
(task_id)¶ 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).
- children – List of serialized results of subtasks of this task.
- 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.
-
warn_if_repeatable_read
()¶
-
-
class
djcelery.managers.
TaskSetManager
¶ Manager for
celery.models.TaskSet
models.-
delete_taskset
(taskset_id)¶ Delete a saved taskset result.
-
restore_taskset
(taskset_id)¶ Get the async result instance by taskset id.
-
store_result
(*args, **kwargs)¶ Store the async result instance of a taskset.
Parameters: - taskset_id – task set id
- result – The return value of the taskset
-
-
class
djcelery.managers.
TaskStateManager
¶ -
active
()¶
-
expire_by_states
(states, expires)¶
-
expired
(states, expires, nowfun=<function now>)¶
-
purge
()¶
-
-
exception
djcelery.managers.
TxIsolationWarning
¶
-
djcelery.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.
-
djcelery.managers.
update_model_with_dict
(obj, fields)¶