Browse Source

增加写入title tag的任务

zhangbo 11 months ago
parent
commit
89d744d835
1 changed files with 4 additions and 1 deletions
  1. 4 1
      write_redis/alg_recsys_feature_01_vid2titletags_redis.py

+ 4 - 1
write_redis/alg_recsys_feature_01_vid2titletags_redis.py

@@ -134,6 +134,9 @@ def main():
         hour = datetime.now().hour
         log_.info("没有读取到参数,采用系统时间:{}".format(e))
     log_.info("使用时间参数-日期:{},小时:{}".format(date, str(hour)))
+    if hour in ["00"]:
+        log_.info(f"hour={hour}不执行,直接返回。")
+        return
     # 1 判断上游数据表是否生产完成
     project = "loghubods"
     table = "alg_recsys_feature_title_tags"
@@ -158,4 +161,4 @@ if __name__ == '__main__':
 
 # previous_date_str = (datetime.strptime(date, "%Y%m%d") - timedelta(days=1)).strftime("%Y%m%d")
 # cd /root/zhangbo/rov-offline
-# python alg_recsys_feature_01_vid2titletags_redis.py 20240508 13
+# python alg_recsys_feature_01_vid2titletags_redis.py 20240508 14