forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request apache#5 in TP/incubator-airflow from feature/DATA…
…-2817 to develop * commit '768ee500963cab7b5e2172b871cfe0889da7a257': Bump version to 1.8.0-up1.2.0 DATA-2817: support celery worker --hostname arg
- Loading branch information
Showing
4 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
# limitations under the License. | ||
# | ||
|
||
version = '1.8.0-up1.1.0' | ||
version = '1.8.0-up1.2.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py | ||
index 662452e..0f0598d 100755 | ||
--- a/airflow/bin/cli.py | ||
+++ b/airflow/bin/cli.py | ||
@@ -894,6 +894,9 @@ def worker(args): | ||
'concurrency': args.concurrency, | ||
} | ||
|
||
+ if args.hostname: | ||
+ options['hostname'] = args.hostname | ||
+ | ||
if args.daemon: | ||
pid, stdout, stderr, log_file = setup_locations("worker", args.pid, args.stdout, args.stderr, args.log_file) | ||
handle = setup_logging(log_file) | ||
@@ -1405,6 +1408,9 @@ class CLIFactory(object): | ||
type=int, | ||
help="The number of worker processes", | ||
default=conf.get('celery', 'celeryd_concurrency')), | ||
+ 'worker_hostname': Arg( | ||
+ ('-hn', '--hostname'), | ||
+ help="Set custom worker hostname"), | ||
# flower | ||
'broker_api': Arg(("-a", "--broker_api"), help="Broker api"), | ||
'flower_hostname': Arg( | ||
@@ -1564,8 +1570,8 @@ class CLIFactory(object): | ||
}, { | ||
'func': worker, | ||
'help': "Start a Celery worker node", | ||
- 'args': ('do_pickle', 'queues', 'concurrency', | ||
- 'pid', 'daemon', 'stdout', 'stderr', 'log_file'), | ||
+ 'args': ('do_pickle', 'queues', 'concurrency', 'pid', 'daemon', | ||
+ 'stdout', 'stderr', 'log_file', 'worker_hostname'), | ||
}, { | ||
'func': flower, | ||
'help': "Start a Celery Flower", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters