tomoya há 1 semana atrás
pai
commit
16a6479cca
1 ficheiros alterados com 12 adições e 0 exclusões
  1. 12 0
      backend/app/app/api/api_v1/endpoints/edm_saas_api.py

+ 12 - 0
backend/app/app/api/api_v1/endpoints/edm_saas_api.py

@@ -145,6 +145,18 @@ async def update_detect_info(
     video_data['style'] = style
     video_data['lang'] = lang
     background_tasks.add_task(wait_finish, video_data)
+    
+    headers = {
+        'Content-Type': 'application/json'
+    }
+    data = {
+        'message':f'cloud-choozmo-com\n \
+                    Video\n \
+                    user: {username}\n \
+                    video: {video_data["id"]}\n \
+                    state: queuing'     
+    }
+    data = requests.post(LINE_URL, headers=headers, json=data) 
     return  JSONResponse(return_msg, background=background_tasks)
     
 async def wait_finish(video_data:dict):