zhangyong 1 năm trước cách đây
mục cha
commit
e4e5ab2c8c
2 tập tin đã thay đổi với 4 bổ sung5 xóa
  1. 2 2
      main.py
  2. 2 3
      video_stitching/video_stitching.py

+ 2 - 2
main.py

@@ -22,8 +22,8 @@ def job_video_stitching():
     jieri_count = sql.get_jieri_account_id()
     ks_yinmei_count = sql.get_ks_yinmei_account_id()
     if int(jieri_count) < 20:
-        Common.logger("video").info("开始执行-口播")
-        video_type = "口播--节日类"
+        Common.logger("video").info("开始执行-口播-小年")
+        video_type = "口播--美文类"
         channel_type = "xiaonian"
         VideoStitching.video_stitching(video_type, koubo_count, channel_type)
     elif int(ks_yinmei_count) < 10:

+ 2 - 3
video_stitching/video_stitching.py

@@ -95,8 +95,7 @@ class VideoStitching():
         return id
 
     @classmethod
-    def get_account_id(cls):
-        channel_type = "koubo"
+    def get_account_id(cls, channel_type):
         account_id = f"""select account_id from video_url where oss_object_key LIKE '%{channel_type}%' group by account_id ;"""
         account_id = MysqlHelper.get_values(account_id, "prod")
         return account_id
@@ -360,7 +359,7 @@ class VideoStitching():
                 return
         else:
             # 获取已入库的用户id
-            account_id = cls.get_account_id()
+            account_id = cls.get_account_id(channel_type)
             account = random.choice(account_id)
             account = str(account).replace('(', '').replace(')', '').replace(',', '')
             Common.logger("video").info(f"获取用户ID:{account}")