potiuk 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_r368249329
 
 

 ##########
 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:
   I'd have to discuss it in detail in-person, I am not 100% sure how PID 
handling should be done now :). Seems we have few places where it happens and I 
am not sure I understand all the paths.

----------------------------------------------------------------
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

Reply via email to