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: é¡åç¾² <[email protected]> Authored: Sun Jul 23 21:18:50 2017 +0200 Committer: Bolke de Bruin <[email protected]> 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,
