|
@@ -232,8 +232,6 @@ class GenerateTextFromVideo(object):
|
|
|
video_file=google_file
|
|
|
)
|
|
|
if video_text:
|
|
|
- print(type(video_text))
|
|
|
- print(video_text)
|
|
|
update_sql = f"""
|
|
|
update video_content_understanding
|
|
|
set understanding_status = %s, video_text = %s, file_state = %s
|
|
@@ -249,14 +247,14 @@ class GenerateTextFromVideo(object):
|
|
|
const.PROCESSING_STATUS
|
|
|
)
|
|
|
)
|
|
|
- # # delete local file and google file
|
|
|
- # if os.path.exists(video_local_path):
|
|
|
- # os.remove(video_local_path)
|
|
|
- #
|
|
|
- # tqdm.write("video transform to text success, delete local file")
|
|
|
+ # delete local file and google file
|
|
|
+ if os.path.exists(video_local_path):
|
|
|
+ os.remove(video_local_path)
|
|
|
+
|
|
|
+ tqdm.write("video transform to text success, delete local file")
|
|
|
task_list.remove(task)
|
|
|
- #
|
|
|
- # self.google_ai_api.delete_video(file_name)
|
|
|
+
|
|
|
+ self.google_ai_api.delete_video(file_name)
|
|
|
tqdm.write("delete video from google success: {}".format(file_name))
|
|
|
else:
|
|
|
# roll back status
|