Shutdown the logger before restarting CPS. Fixes issue #587
This commit is contained in:
1 parent
897a7ea122
commit
64c044acc1
1 file changed
+5
-1
+5
-1
@@ -9,7 +9,7 @@ import socket
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
import time
|
||||||
|
|
||||||
# Root path
|
# Root path
|
||||||
base_path = dirname(os.path.abspath(__file__))
|
base_path = dirname(os.path.abspath(__file__))
|
||||||
@@ -96,6 +96,10 @@ class Loader(object):
|
|||||||
except:
|
except:
|
||||||
self.log.critical(traceback.format_exc())
|
self.log.critical(traceback.format_exc())
|
||||||
|
|
||||||
|
# Release log files and shutdown logger
|
||||||
|
logging.shutdown()
|
||||||
|
time.sleep(3)
|
||||||
|
|
||||||
args = [sys.executable] + [os.path.join(base_path, __file__)] + sys.argv[1:]
|
args = [sys.executable] + [os.path.join(base_path, __file__)] + sys.argv[1:]
|
||||||
subprocess.Popen(args)
|
subprocess.Popen(args)
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in new issue
Block a user