|
@@ -133,7 +133,7 @@ class ExtractVideoBestFrame:
|
|
|
return update_rows
|
|
|
|
|
|
def set_extract_result(
|
|
|
- self, task_id: int, file_state: str, best_frame_tims_ms: str
|
|
|
+ self, task_id: int, file_state: str, best_frame_time_ms: str
|
|
|
) -> int:
|
|
|
update_query = f"""
|
|
|
update {const.TABLE_NAME}
|
|
@@ -147,7 +147,7 @@ class ExtractVideoBestFrame:
|
|
|
const.SUCCESS_STATUS,
|
|
|
datetime.datetime.now(),
|
|
|
file_state,
|
|
|
- best_frame_tims_ms,
|
|
|
+ best_frame_time_ms,
|
|
|
task_id,
|
|
|
const.PROCESSING_STATUS,
|
|
|
),
|
|
@@ -306,15 +306,15 @@ class ExtractVideoBestFrame:
|
|
|
case "ACTIVE":
|
|
|
# video process successfully
|
|
|
try:
|
|
|
- best_frame_tims_ms = google_ai.fetch_info_from_google_ai(
|
|
|
+ best_frame_time_ms = google_ai.fetch_info_from_google_ai(
|
|
|
prompt=extract_best_frame_prompt(),
|
|
|
video_file=google_file,
|
|
|
)
|
|
|
- if best_frame_tims_ms:
|
|
|
+ if best_frame_time_ms:
|
|
|
self.set_extract_result(
|
|
|
task_id=task["id"],
|
|
|
file_state="ACTIVE",
|
|
|
- best_frame_tims_ms=best_frame_tims_ms.strip(),
|
|
|
+ best_frame_time_ms=best_frame_time_ms.strip(),
|
|
|
)
|
|
|
else:
|
|
|
update_task_queue_status(
|
|
@@ -337,7 +337,7 @@ class ExtractVideoBestFrame:
|
|
|
"task_id": task["id"],
|
|
|
"file_name": file_name,
|
|
|
"state": state,
|
|
|
- "best_frame_tims_ms": best_frame_tims_ms,
|
|
|
+ "best_frame_time_ms": best_frame_time_ms,
|
|
|
},
|
|
|
)
|
|
|
except Exception as e:
|