From 97173287958f7e8b1b02f77f73c555faafe222a9 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 8 Mar 2018 17:36:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PriceSystem/CalcCmdReceiver.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PriceSystem/CalcCmdReceiver.py b/PriceSystem/CalcCmdReceiver.py index a27d5a8..c6191d8 100644 --- a/PriceSystem/CalcCmdReceiver.py +++ b/PriceSystem/CalcCmdReceiver.py @@ -47,8 +47,8 @@ def format_cmd(cmd): if __name__ == "__main__": - if os.path.exists("/var/run/price.sys.stop"): - os.remove("/var/run/price.sys.stop") + if os.path.exists("/var/run/price/price.sys.stop"): + os.remove("/var/run/price/price.sys.stop") pro_num = config.get_worker_num() pool = multiprocessing.Pool(processes=pro_num) for pid in range(0, pro_num): @@ -56,11 +56,11 @@ if __name__ == "__main__": pool.close() logger.info("均价系统启动成功") while True: - if os.path.exists("/var/run/price.sys.stop"): + if os.path.exists("/var/run/price/price.sys.stop"): pool.terminate() break else: time.sleep(3) - if os.path.exists("/var/run/price.sys.stop"): - os.remove("/var/run/price.sys.stop") + if os.path.exists("/var/run/price/price.sys.stop"): + os.remove("/var/run/price/price.sys.stop") pool.join()