This commit is contained in:
2018-04-04 13:39:53 +08:00
parent e7253c1d50
commit 0067e12701
+1 -3
View File
@@ -21,7 +21,6 @@ def worker():
cmd = client.lpop(QUEUE)
except Exception as ex:
cmd = None
print(ex)
if cmd is None:
time.sleep(60)
logger.info("等待接受计算命令")
@@ -33,10 +32,9 @@ def worker():
end_time = time.time()
logger.info("Calc SUC:" + str(cmd) + "\t计算成功,耗时:" + str(end_time - start_time))
except BaseException as ex:
print(ex)
logger.exception(ex)
end_time = time.time()
logger.error("Calc ERROR :" + str(cmd) + "\t计算失败,耗时:" + (end_time - start_time))
logger.error("Calc ERROR :" + str(cmd) + "\t计算失败,耗时:" + str(end_time - start_time))
def format_cmd(cmd):