zhangyong há 3 meses atrás
pai
commit
e46093e71d
2 ficheiros alterados com 3 adições e 1 exclusões
  1. 1 1
      utils/redis.py
  2. 2 0
      workers/consumption_work.py

+ 1 - 1
utils/redis.py

@@ -17,7 +17,7 @@ class RedisHelper(object):
                 port=6379,
                 db=0,
                 password="Wqsd@2019",
-                max_connections=10)
+                max_connections=100)
         return self._pool
 
     def get_client(self) -> aioredis.client.Redis:

+ 2 - 0
workers/consumption_work.py

@@ -74,12 +74,14 @@ class ConsumptionRecommend(object):
 async def run():
     scheduler = AsyncIOScheduler()
     try:
+        logger.info(f"[处理] 开始启动")
         scheduler.add_job(ConsumptionRecommend.run, trigger=CronTrigger(minute=2, second=0))  # 每小时获取一次
         scheduler.start()
         await asyncio.Event().wait()
     except KeyboardInterrupt:
         pass
     except Exception as e:
+        logger.error(f"[处理] 启动异常,异常信息:{e}")
         pass
     finally:
         scheduler.shutdown()