nuclearpinguin commented on a change in pull request #7206: [AIRFLOW-6591] Add
cli option to stop celery worker
URL: https://github.com/apache/airflow/pull/7206#discussion_r368232641
##########
File path: airflow/cli/commands/celery_command.py
##########
@@ -115,23 +127,19 @@ def worker(args):
'autoscale': autoscale,
'hostname': args.celery_hostname,
'loglevel': conf.get('logging', 'LOGGING_LEVEL'),
+ 'pidfile': pid_file_path,
}
if conf.has_option("celery", "pool"):
options["pool"] = conf.get("celery", "pool")
if args.daemon:
- pid, stdout, stderr, log_file = setup_locations("worker",
- args.pid,
- args.stdout,
- args.stderr,
- args.log_file)
+ # Run Celery worker as daemon
handle = setup_logging(log_file)
stdout = open(stdout, 'w+')
stderr = open(stderr, 'w+')
ctx = daemon.DaemonContext(
- pidfile=TimeoutPIDLockFile(pid, -1),
Review comment:
Also, it seems that -D flag doesn't work with this line. No error is
propagated and I see no new celery processes. When I remove it, everything
works as expected? WDYT? @potiuk @mik-laj @dimberman
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services