优化
This commit is contained in:
@@ -48,11 +48,6 @@ def format_cmd(cmd):
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
pid_file = open("/var/run/price.sys.pid", "w")
|
||||
pid_file.write(str(os.getpid()))
|
||||
pid_file.flush()
|
||||
pid_file.close()
|
||||
|
||||
pro_num = config.get_worker_num()
|
||||
pool = multiprocessing.Pool(processes=pro_num)
|
||||
pool.terminate()
|
||||
@@ -66,4 +61,4 @@ if __name__ == "__main__":
|
||||
break
|
||||
pool.join()
|
||||
if os.path.exists("/var/run/price.sys.stop"):
|
||||
os.remove("/var/run/price.sys.stop")
|
||||
os.remove("/var/run/price.sys.stop")
|
||||
|
||||
Reference in New Issue
Block a user