zhangyong 1 tahun lalu
induk
melakukan
286997c1dc
2 mengubah file dengan 4 tambahan dan 4 penghapusan
  1. 1 1
      main.py
  2. 3 3
      video_stitching/video_stitching.py

+ 1 - 1
main.py

@@ -18,7 +18,7 @@ def job_douyin_data():
 schedule.every().day.at("14:00").do(job_douyin_data)
 
 # 设置上午4点运行任务
-schedule.every().day.at("11:40").do(job_video_stitching)
+schedule.every().day.at("12:25").do(job_video_stitching)
 
 while True:
     schedule.run_pending()

+ 3 - 3
video_stitching/video_stitching.py

@@ -131,7 +131,7 @@ class VideoStitching():
         total_duration = 0
         included_videos = []
         # 设置最大可使用的内存限制(单位:字节)
-        memory_limit = 2 * 1024 * 1024 * 1024  # 2GB
+        memory_limit = 6 * 1024 * 1024 * 1024  # 6GB
         resource.setrlimit(resource.RLIMIT_AS, (memory_limit, memory_limit))
         # 提取视频的音频
         Common.logger().info(f"开始提取视频的音频{audio}")
@@ -323,14 +323,14 @@ class VideoStitching():
                         count += 1
                         Common.logger().info(f"视频添加到对应用户成功")
 
-                        if count >= 12:
+                        if count >= 5:
                             break
                         # 释放视频对象
                         video_with_subtitles.close()
             except Exception as e:
                 Common.logger().warning(f"新拼接视频发送oss失败:{e}\n")
                 continue
-            if count >= 12:
+            if count >= 5:
                 break
 
     @classmethod