This commit is contained in:
2018-03-08 16:31:25 +08:00
parent 1cc54d3754
commit e06483bbf8
+7
View File
@@ -55,8 +55,15 @@ if __name__ == "__main__":
pro_num = config.get_worker_num()
pool = multiprocessing.Pool(processes=pro_num)
pool.terminate()
for pid in range(0, pro_num):
pool.apply_async(worker, ())
pool.close()
logger.info("均价系统启动成功")
while True:
if os.path.exists("/var/run/price.sys.stop"):
pool.terminate()
break
pool.join()
if os.path.exists("/var/run/price.sys.stop"):
os.remove("/var/run/price.sys.stop")