File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -16,3 +16,9 @@ class ERROR:
1616 FAILED_CREATE_SUBTITLE = "자막 파일 생성에 실패했습니다."
1717 FAILED_CONNECT_CHANNEL = "채널 연결에 실패했습니다."
1818 SERVER_ERROR = "서버 오류가 발생했습니다."
19+
20+ class CODE :
21+ class SUCCESSS :
22+ ANALYZE = "SUCCESS_ANALYZE"
23+ class FAILED :
24+ ANALYZE = "FAILED_ANALYZE"
Original file line number Diff line number Diff line change 22import os
33
44from analyze_video import analyze_frame
5- from config .constants import MESSAGES
5+ from config .constants import MESSAGES , CODE
66from gcs .generate_signed_url import generate_signed_url
77from gcs .read import get_video
88from gcs .write import upload_video
@@ -48,6 +48,7 @@ def process_message(body):
4848 signed_url = generate_signed_url (file_name = file_name )
4949 message = {
5050 "email" : email ,
51+ "code" : CODE .SUCCESSS .ANALYZE ,
5152 "message" : MESSAGES .SUCCESS .ANALYZE ,
5253 "url" : signed_url
5354 }
@@ -57,8 +58,9 @@ def process_message(body):
5758 except Exception as err :
5859 message = {
5960 "email" : email ,
61+ "code" : CODE .FAILED .ANALYZE ,
6062 "message" : str (err ),
61- "url" : ""
63+ "url" : None
6264 }
6365
6466 return message
You can’t perform that action at this time.
0 commit comments