django_celery_results.backends
¶
- class django_celery_results.backends.CacheBackend(*args, **kwargs)[source]¶
Backend using the Django cache framework to store task metadata.
- property cache_backend¶
- class django_celery_results.backends.DatabaseBackend(app, serializer=None, max_cached_results=None, accept=None, expires=None, expires_type=None, url=None, **kwargs)[source]¶
The Django database backend, using models to store task state.
- GroupModel¶
alias of
GroupResult
- TaskModel¶
alias of
TaskResult
- apply_chord(header_result_args, body, **kwargs)[source]¶
Add a ChordCounter with the expected number of results
- exception_safe_to_retry(exc)[source]¶
Check if an exception is safe to retry.
Backends have to overload this method with correct predicates dealing with their exceptions.
By default no exception is safe to retry, it’s up to backend implementation to define which exceptions are safe.
For Celery / django-celery-results, retry Django / Psycopg2 InterfaceErrors, like “Connection already closed”, with new connection.
Set result_backend_always_retry to True in order to enable retries.
- on_chord_part_return(request, state, result, **kwargs)[source]¶
Called on finishing each part of a Chord header
- subpolling_interval = 0.5¶
Time to sleep between polling each individual item in ResultSet.iterate. as opposed to the interval argument which is for each pass.