瀏覽代碼

add line notify

ming 3 年之前
父節點
當前提交
62efd0dcaa
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      api/main.py

+ 4 - 3
api/main.py

@@ -536,12 +536,13 @@ def gen_video_long_queue(name_hash,name,text_content, image_urls,avatar,multiLan
                 print(msg)
                 msg =msg.encode(encoding='utf-8')
                 mailer.send(msg, email)
-                notify_line_user(msg, line_token)
+                #notify_line_user(msg, line_token)
+                notify_group(name+":帳號餘額不足,請至email查看詳細資訊")
             else:
                 left_time = left_time - vid_duration
                 db.query('UPDATE users SET left_time ='+str(left_time)+' WHERE id='+str(user_id)+';')
-                #notify_group(name+"的影片已經產生完成囉! www.choozmo.com:8168/"+video_sub_folder+name_hash+".mp4")
-                notify_line_user(name+"的影片已經產生完成囉! www.choozmo.com:8168/"+video_sub_folder+name_hash+".mp4", line_token)
+                notify_group(name+"的影片已經產生完成囉! www.choozmo.com:8168/"+video_sub_folder+name_hash+".mp4")
+                #notify_line_user(name+"的影片已經產生完成囉! www.choozmo.com:8168/"+video_sub_folder+name_hash+".mp4", line_token)
         except Exception as e:
             logging.error(traceback.format_exc())
             print('video generation error')