This document describes the current stable version of Celery (4.3). For development docs, go here.


Worker name utilities.


Return the kombu.Queue being a direct route to a worker.

Parameters:hostname (str, Queue) – The fully qualified node name of a worker (e.g., If passed a kombu.Queue instance it will simply return that instead.
celery.utils.nodenames.gethostname() → string

Return the current host name.

celery.utils.nodenames.nodename(name, hostname)[source]

Create node name from name/hostname pair.

celery.utils.nodenames.anon_nodename(hostname=None, prefix='gen')[source]

Return the nodename for this process (not a worker).

This is used for e.g. the origin task message field.


Split node name into tuple of name/hostname.


Return the default nodename for this process.

celery.utils.nodenames.node_format(s, name, **extra)[source]

Format worker node name (

celery.utils.nodenames.host_format(s, host=None, name=None, **extra)[source]

Format host %x abbreviations.