celery.utils
celery.utils.worker_direct(hostname)
Return kombu.Queue that is a direct route to a worker by hostname.
celery.utils.warn_deprecated(description=None, deprecation=None, removal=None, alternative=None, stacklevel=2)
celery.utils.deprecated(deprecation=None, removal=None, alternative=None, description=None)[源代码]
Decorator for deprecated functions.
A deprecation warning will be emitted when the function is called.
参数: |
|
---|
celery.utils.lpmerge(L, R)
In place left precedent dictionary merge.
Keeps values from L, if the value in R is None.
celery.utils.isatty(fh)[源代码]
celery.utils.cry(out=None, sepchr=’=’, seplen=49)
Return stacktrace of all active threads, taken from https://gist.github.com/737056.
celery.utils.maybe_reraise()
Re-raise if an exception is currently being handled, or return otherwise.
celery.utils.strtobool(term, table={‘1’: True, ‘0’: False, ‘false’: False, ‘no’: False, ‘off’: False, ‘yes’: True, ‘on’: True, ‘true’: True})[源代码]
Convert common terms for true/false to bool (true/false/yes/no/on/off/1/0).
celery.utils.jsonify(obj, builtin_types=(<type ‘int’>, <type ‘float’>, <type ‘basestring’>), key=None, keyfilter=None, unknown_type_filter=None)
Transforms object making it suitable for json serialization
Generate task name from name/module pair.
celery.utils.nodename(name, hostname)
Create node name from name/hostname pair.
celery.utils.nodesplit(nodename)
Split node name into tuple of name/hostname.
class celery.utils.cached_property(fget=None, fset=None, fdel=None, doc=None)
Property descriptor that caches the return value of the get function.
Examples
deleter(fdel)