You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bo...@apache.org on 2017/07/23 19:19:02 UTC
incubator-airflow git commit: [AIRFLOW-1356] add `--celery_hostname`
to `airflow worker`
Repository: incubator-airflow
Updated Branches:
refs/heads/v1-8-stable ca97ca752 -> 95f5b8054
[AIRFLOW-1356] add `--celery_hostname` to `airflow worker`
Closes #2405 from d2207197/airflow-1356
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/95f5b805
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/95f5b805
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/95f5b805
Branch: refs/heads/v1-8-stable
Commit: 95f5b80542fc6259f333a426c13f1652fa5631b4
Parents: ca97ca7
Author: 顏孜羲 <jo...@gmail.com>
Authored: Sun Jul 23 21:18:50 2017 +0200
Committer: Bolke de Bruin <bo...@xs4all.nl>
Committed: Sun Jul 23 21:18:50 2017 +0200
----------------------------------------------------------------------
airflow/bin/cli.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/95f5b805/airflow/bin/cli.py
----------------------------------------------------------------------
diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py
index 8e92ea1..0cc7027 100755
--- a/airflow/bin/cli.py
+++ b/airflow/bin/cli.py
@@ -915,6 +915,7 @@ def worker(args):
'O': 'fair',
'queues': args.queues,
'concurrency': args.concurrency,
+ 'hostname': args.celery_hostname,
}
if args.daemon:
@@ -1423,6 +1424,10 @@ class CLIFactory(object):
type=int,
help="The number of worker processes",
default=conf.get('celery', 'celeryd_concurrency')),
+ 'celery_hostname': Arg(
+ ("-cn", "--celery_hostname"),
+ help=("Set the hostname of celery worker "
+ "if you have multiple workers on a single machine.")),
# flower
'broker_api': Arg(("-a", "--broker_api"), help="Broker api"),
'flower_hostname': Arg(
@@ -1582,7 +1587,7 @@ class CLIFactory(object):
}, {
'func': worker,
'help': "Start a Celery worker node",
- 'args': ('do_pickle', 'queues', 'concurrency',
+ 'args': ('do_pickle', 'queues', 'concurrency', 'celery_hostname',
'pid', 'daemon', 'stdout', 'stderr', 'log_file'),
}, {
'func': flower,