You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2023/08/18 08:59:37 UTC

[phoenix-queryserver] branch master updated: PHOENIX-7020 Queryserver fail to stop if PHOENIX_QUERYSERVER_LOG_DIR is changed

This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 194abe6  PHOENIX-7020 Queryserver fail to stop if PHOENIX_QUERYSERVER_LOG_DIR is changed
194abe6 is described below

commit 194abe6315fcec03d18e2590c6dc130d7569e98b
Author: guluo <lu...@qq.com>
AuthorDate: Thu Aug 17 21:49:14 2023 +0800

    PHOENIX-7020 Queryserver fail to stop if PHOENIX_QUERYSERVER_LOG_DIR is changed
---
 bin/queryserver.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/bin/queryserver.py b/bin/queryserver.py
index 325a03c..ec73f1f 100755
--- a/bin/queryserver.py
+++ b/bin/queryserver.py
@@ -148,6 +148,10 @@ if command == 'makeWinServiceDesc':
     print("</service>")
     sys.exit()
 
+d = os.path.dirname(out_file_path)
+if not os.path.exists(d):
+    os.makedirs(d)
+
 if command == 'start':
     if not daemon_supported:
         sys.stderr.write("daemon mode not supported on this platform{}".format(os.linesep))
@@ -158,9 +162,6 @@ if command == 'start':
     os.umask(current_umask)
 
     # run in the background
-    d = os.path.dirname(out_file_path)
-    if not os.path.exists(d):
-        os.makedirs(d)
     with open(out_file_path, 'a+') as out:
         context = daemon.DaemonContext(
             pidfile = daemon.PidFile(pid_file_path, 'Query Server already running, PID file found: %s' % pid_file_path),