你正在阅读 Celery 3.1 的文档。开发版本文档见: 此处.
Utility functions.
Return kombu.Queue that is a direct route to a worker by hostname.
参数: | hostname – The fully qualified node name of a worker (e.g. w1@example.com). If passed a kombu.Queue instance it will simply return that instead. |
---|
Decorator for deprecated functions.
A deprecation warning will be emitted when the function is called.
参数: |
|
---|
In place left precedent dictionary merge.
Keeps values from L, if the value in R is None.
Return stacktrace of all active threads, taken from https://gist.github.com/737056.
Re-raise if an exception is currently being handled, or return otherwise.
Convert common terms for true/false to bool (true/false/yes/no/on/off/1/0).
Transforms object making it suitable for json serialization
Create node name from name/hostname pair.
Split node name into tuple of name/hostname.
Property descriptor that caches the return value of the get function.
Examples
@cached_property
def connection(self):
return Connection()
@connection.setter # Prepares stored value
def connection(self, value):
if value is None:
raise TypeError('Connection must be a connection')
return value
@connection.deleter
def connection(self, value):
# Additional action to do at del(self.attr)
if value is not None:
print('Connection {0!r} deleted'.format(value)