celery.backends.base
The base backend class. All backends should inherit from this.
Wait for task and return its result.
If the task raises an exception, this exception will be re-raised by wait_for().
If timeout is not None, this raises the celery.timer.TimeoutError exception if the operation takes longer than timeout seconds.
Wraps unpickleable exceptions.
Parameters: |
|
---|
Example
>>> try:
... something_raising_unpickleable_exc()
>>> except Exception, e:
... exc = UnpickleableException(e.__class__.__module__,
... e.__class__.__name__,
... e.args)
... pickle.dumps(exc) # Works fine.
With an exception instance, iterate over its super classes (by mro) and find the first super exception that is pickleable.
Parameter: | exc – An exception instance. |
---|---|
Return type: | Exception |