[GitHub] [airflow] nuclearpinguin commented on a change in pull request #7245: [AIRFLOW-6624] Improve webserver command with pidfile checking

2020-02-22 Thread GitBox
nuclearpinguin commented on a change in pull request #7245: [AIRFLOW-6624] 
Improve webserver command with pidfile checking
URL: https://github.com/apache/airflow/pull/7245#discussion_r382904441
 
 

 ##
 File path: airflow/cli/commands/webserver_command.py
 ##
 @@ -263,40 +264,31 @@ def monitor_gunicorn(gunicorn_master_proc):
 sys.exit(gunicorn_master_proc.returncode)
 
 if args.daemon:
-base, ext = os.path.splitext(pid)
-ctx = daemon.DaemonContext(
-pidfile=TimeoutPIDLockFile(base + "-monitor" + ext, -1),
-files_preserve=[handle],
-stdout=stdout,
-stderr=stderr,
-signal_map={
-signal.SIGINT: kill_proc,
-signal.SIGTERM: kill_proc
-},
 
 Review comment:
   I've moved those to `monitor_gunicorn` to avoid code duplication (we 
register them in both daemon and not versions). 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [airflow] nuclearpinguin commented on a change in pull request #7245: [AIRFLOW-6624] Improve webserver command with pidfile checking

2020-01-23 Thread GitBox
nuclearpinguin commented on a change in pull request #7245: [AIRFLOW-6624] 
Improve webserver command with pidfile checking
URL: https://github.com/apache/airflow/pull/7245#discussion_r370287859
 
 

 ##
 File path: airflow/cli/commands/webserver_command.py
 ##
 @@ -195,15 +197,11 @@ def webserver(args):
 port=args.port, host=args.hostname,
 ssl_context=(ssl_cert, ssl_key) if ssl_cert and ssl_key else 
None)
 else:
-os.environ['SKIP_DAGS_PARSING'] = 'True'
-app = cached_app(None)
-pid, stdout, stderr, log_file = setup_locations(
+pid_file, stdout, stderr, log_file = setup_locations(
 "webserver", args.pid, args.stdout, args.stderr, args.log_file)
-os.environ.pop('SKIP_DAGS_PARSING')
 
 Review comment:
   The `app` was unused and I see no reason for those env changes when we 
remove the app.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [airflow] nuclearpinguin commented on a change in pull request #7245: [AIRFLOW-6624] Improve webserver command with pidfile checking

2020-01-23 Thread GitBox
nuclearpinguin commented on a change in pull request #7245: [AIRFLOW-6624] 
Improve webserver command with pidfile checking
URL: https://github.com/apache/airflow/pull/7245#discussion_r370288287
 
 

 ##
 File path: airflow/cli/commands/webserver_command.py
 ##
 @@ -263,40 +264,31 @@ def monitor_gunicorn(gunicorn_master_proc):
 sys.exit(gunicorn_master_proc.returncode)
 
 if args.daemon:
-base, ext = os.path.splitext(pid)
-ctx = daemon.DaemonContext(
-pidfile=TimeoutPIDLockFile(base + "-monitor" + ext, -1),
-files_preserve=[handle],
-stdout=stdout,
-stderr=stderr,
-signal_map={
-signal.SIGINT: kill_proc,
-signal.SIGTERM: kill_proc
-},
 
 Review comment:
   I moved the signal handling to `monitor_gunicorn` function.


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:
us...@infra.apache.org


With regards,
Apache Git Services