celery.utils.serialization
exception celery.utils.serialization.UnpickleableExceptionWrapper(exc_module, exc_cls_name, exc_args, text=None)
Wraps unpickleable exceptions.
Example
exc_cls_name = None
The name of the original exception class.
-
The module of the original exception.
restore()[源代码]
celery.utils.serialization.subclass_exception(name, parent, module)
celery.utils.serialization.find_pickleable_exception(exc, loads=<built-in function loads>, dumps=<built-in function dumps>)
With an exception instance, iterate over its super classes (by mro) and find the first super exception that is pickleable. It does not go below Exception (i.e. it skips , BaseException and object). If that happens you should use UnpickleableException instead.
参数: | exc – An exception instance. |
---|
Will return the nearest pickleable parent exception class (except Exception and parents), or if the exception is pickleable it will return None.
celery.utils.serialization.create_exception_cls(name, module, parent=None)
Dynamically create an exception class.
celery.utils.serialization.get_pickleable_exception(exc)[源代码]
Make sure exception is pickleable.
celery.utils.serialization.get_pickleable_etype(cls, loads=<built-in function loads>, dumps=<built-in function dumps>)
celery.utils.serialization.get_pickled_exception(exc)
Get original exception from exception pickled using get_pickleable_exception().