浏览代码

更改通知

zhangyong 11 月之前
父节点
当前提交
013a75846e
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 1 1
      common/feishu_form.py
  2. 4 0
      video_rewriting/video_data.py

+ 1 - 1
common/feishu_form.py

@@ -43,7 +43,7 @@ class Material():
             new_id = row[3]
             number = row[4]
             title = row[5]
-            if new_id:
+            if new_id != 'None' and new_id != '' and new_id != None:
                 number = {"task_mark": task_mark, "old_id": old_id, "video_id": video_id, "new_id": new_id,
                           "number": number, "title": title}
                 list.append(number)

+ 4 - 0
video_rewriting/video_data.py

@@ -119,7 +119,11 @@ class getVideo():
                                 os.remove(new_video_path)
                         else:
                             Common.logger("log").info(f"{task_mark}下的视频ID{id} 视频发送OSS失败 ")
+                    if old_id != 'None' and old_id != '' and old_id != None:
+                        Feishu.bot(mark, '机器自动改造消息通知', f'{task_mark}任务改造完成,请关注', name)
+                if video_id != 'None' and video_id != '' and video_id != None:
                     Feishu.bot(mark, '机器自动改造消息通知', f'{task_mark}任务改造完成,请关注', name)
+
             except Exception as e:
                 Common.logger("warning").warning(f"{name}的{task_mark}任务处理失败:{e}\n")
         return mark