Browse Source

修改定时任务间隔

jihuaqiang 2 weeks ago
parent
commit
f09fddc447
2 changed files with 2 additions and 2 deletions
  1. 1 1
      workers/video_insight_select_work.py
  2. 1 1
      workers/video_insight_trigger_work.py

+ 1 - 1
workers/video_insight_select_work.py

@@ -20,7 +20,7 @@ def requirement_insight():
         logger.info(f"视频需求点洞察")
         # redis_task = "task:video_insight"
         redis_trigger_task = "task:video_trigger_insight"
-        sql =f'select clickobjectid as video_id from loghubods.user_share_log where dt = {dt} and topic = "click" group by clickobjectid order by count(distinct machinecode) desc limit 1200'
+        sql =f'select clickobjectid as video_id from loghubods.user_share_log where dt = {dt} and topic = "click" group by clickobjectid order by count(distinct machinecode) desc limit 1300'
         data = OdpsDataCount.main(sql)
         if not data:
             return

+ 1 - 1
workers/video_insight_trigger_work.py

@@ -178,7 +178,7 @@ async def run():
     scheduler = AsyncIOScheduler()
     try:
         logger.info(f"[处理 - trigger] 开始启动")
-        scheduler.add_job(ConsumptionRecommend.run, trigger=IntervalTrigger(minutes=5))  # 每5分钟启动一次
+        scheduler.add_job(ConsumptionRecommend.run, trigger=IntervalTrigger(minutes=4))  # 每4分钟启动一次
         scheduler.start()
         await asyncio.Event().wait()
     except KeyboardInterrupt: