diff --git a/PriceSystem/CalcCmdReceiver.py b/PriceSystem/CalcCmdReceiver.py index bc86fe3..fc161f9 100644 --- a/PriceSystem/CalcCmdReceiver.py +++ b/PriceSystem/CalcCmdReceiver.py @@ -19,8 +19,9 @@ def worker(): while True: try: cmd = client.lpop(QUEUE) - except: + except Exception as ex: cmd = None + print(ex) if cmd is None: time.sleep(60) logger.info("等待接受计算命令") @@ -35,7 +36,7 @@ def worker(): print(ex) logger.exception(ex) end_time = time.clock() - logger.error("Calc ERROR :" + str(cmd) + "\t计算失败,耗时:" + (end_time - start_time), ex) + logger.error("Calc ERROR :" + str(cmd) + "\t计算失败,耗时:" + (end_time - start_time)) def format_cmd(cmd): diff --git a/PriceSystem/config/__init__.py b/PriceSystem/config/__init__.py index 5127572..cef8843 100644 --- a/PriceSystem/config/__init__.py +++ b/PriceSystem/config/__init__.py @@ -1,14 +1,6 @@ -logging_config = { - -} - - -def get_logging_config(): - return logging_config - def get_worker_num(): - return 10 + return 20 def get_redis_host():