Selaa lähdekoodia

[docs] Use nodename instead of hostname. Closes #3104

Ask Solem 9 vuotta sitten
vanhempi
commit
f56ff68ab5

+ 2 - 2
docs/userguide/monitoring.rst

@@ -745,7 +745,7 @@ worker-online
 
 The worker has connected to the broker and is online.
 
-- `hostname`: Hostname of the worker.
+- `hostname`: Nodename of the worker.
 - `timestamp`: Event timestamp.
 - `freq`: Heartbeat frequency in seconds (float).
 - `sw_ident`: Name of worker software (e.g. ``py-celery``).
@@ -763,7 +763,7 @@ worker-heartbeat
 Sent every minute, if the worker has not sent a heartbeat in 2 minutes,
 it is considered to be offline.
 
-- `hostname`: Hostname of the worker.
+- `hostname`: Nodename of the worker.
 - `timestamp`: Event timestamp.
 - `freq`: Heartbeat frequency in seconds (float).
 - `sw_ident`: Name of worker software (e.g. ``py-celery``).

+ 1 - 1
docs/userguide/signals.rst

@@ -390,7 +390,7 @@ used to route a task to any specific worker:
 Provides arguments:
 
 * sender
-  Hostname of the worker.
+  Nodename of the worker.
 
 * instance
     This is the :class:`celery.apps.worker.Worker` instance to be initialized.

+ 1 - 1
docs/userguide/tasks.rst

@@ -342,7 +342,7 @@ The request defines the following attributes:
 
 :loglevel: The current log level used.
 
-:hostname: Hostname of the worker instance executing the task.
+:hostname: Node name of the worker instance executing the task.
 
 :delivery_info: Additional message delivery information. This is a mapping
                 containing the exchange and routing key used to deliver this

+ 7 - 5
docs/userguide/workers.rst

@@ -34,7 +34,7 @@ For a full list of available command-line options see
 
 You can also start multiple workers on the same machine. If you do so
 be sure to give a unique name to each individual worker by specifying a
-host name with the :option:`--hostname|-n` argument:
+node name with the :option:`--hostname|-n` argument:
 
 .. code-block:: console
 
@@ -42,7 +42,7 @@ host name with the :option:`--hostname|-n` argument:
     $ celery -A proj worker --loglevel=INFO --concurrency=10 -n worker2.%h
     $ celery -A proj worker --loglevel=INFO --concurrency=10 -n worker3.%h
 
-The hostname argument can expand the following variables:
+The ``hostname`` argument can expand the following variables:
 
     - ``%h``:  Hostname including domain name.
     - ``%n``:  Hostname only.
@@ -149,16 +149,18 @@ can contain variables that the worker will expand:
 Node name replacements
 ----------------------
 
+- ``%N``:  Full node name.
 - ``%h``:  Hostname including domain name.
 - ``%n``:  Hostname only.
 - ``%d``:  Domain name only.
 - ``%i``:  Prefork pool process index or 0 if MainProcess.
 - ``%I``:  Prefork pool process index with separator.
 
-E.g. if the current hostname is ``george.example.com`` then
+E.g. if the current hostname is ``george@foo.example.com`` then
 these will expand to:
 
-- ``--logfile=%h.log`` -> :file:`george.example.com.log`
+- ``--logfile-%N.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`
 
@@ -968,7 +970,7 @@ The output will include the following fields:
 
     * ``hostname``
 
-        Hostname of the remote broker.
+        Node name of the remote broker.
 
     * ``insist``