celery.utils.nodenames
¶
Worker name utilities.
- celery.utils.nodenames.anon_nodename(hostname=None, prefix='gen')[исходный код]¶
Return the nodename for this process (not a worker).
This is used for e.g. the origin task message field.
- celery.utils.nodenames.default_nodename(hostname)[исходный код]¶
Return the default nodename for this process.
- celery.utils.nodenames.gethostname() string ¶
Return the current host name.
- celery.utils.nodenames.host_format(s, host=None, name=None, **extra)[исходный код]¶
Format host %x abbreviations.
- celery.utils.nodenames.node_format(s, name, **extra)[исходный код]¶
Format worker node name (name@host.com).
- celery.utils.nodenames.nodename(name, hostname)[исходный код]¶
Create node name from name/hostname pair.
- celery.utils.nodenames.nodesplit(name)[исходный код]¶
Split node name into tuple of name/hostname.
- celery.utils.nodenames.worker_direct(hostname)[исходный код]¶
Return the
kombu.Queue
being a direct route to a worker.- Параметры:
hostname (str, Queue) – The fully qualified node name of a worker (e.g.,
w1@example.com
). If passed akombu.Queue
instance it will simply return that instead.