Browse Source

Apparently %N already taken by multi, so have to use %p for full nodename

Ask Solem 9 years ago
parent
commit
376ee40ecc
2 changed files with 3 additions and 3 deletions
  1. 1 1
      celery/utils/__init__.py
  2. 2 2
      docs/userguide/workers.rst

+ 1 - 1
celery/utils/__init__.py

@@ -355,7 +355,7 @@ def default_nodename(hostname):
 def node_format(s, nodename, **extra):
     name, host = nodesplit(nodename)
     return host_format(
-        s, host, name or NODENAME_DEFAULT, N=nodename, **extra)
+        s, host, name or NODENAME_DEFAULT, p=nodename, **extra)
 
 
 def _fmt_process_index(prefix='', default='0'):

+ 2 - 2
docs/userguide/workers.rst

@@ -149,7 +149,7 @@ can contain variables that the worker will expand:
 Node name replacements
 ----------------------
 
-- ``%N``:  Full node name.
+- ``%p``:  Full node name.
 - ``%h``:  Hostname including domain name.
 - ``%n``:  Hostname only.
 - ``%d``:  Domain name only.
@@ -159,7 +159,7 @@ Node name replacements
 E.g. if the current hostname is ``george@foo.example.com`` then
 these will expand to:
 
-- ``--logfile-%N.log`` -> :file:`george@foo.example.com.log`
+- ``--logfile-%p.log`` -> :file:`george@foo.example.com.log`
 - ``--logfile=%h.log`` -> :file:`foo.example.com.log`
 - ``--logfile=%n.log`` -> :file:`george.log`
 - ``--logfile=%d`` -> :file:`example.com.log`