fixed a bug
This commit is contained in:
@@ -244,7 +244,24 @@ class VideoRepository:
|
||||
)
|
||||
|
||||
def mark_processing(self, video_hash: str) -> None:
|
||||
self._update_status(video_hash, "processing", None)
|
||||
normalized_hash = normalize_video_hash(video_hash)
|
||||
with self._connect() as connection:
|
||||
connection.execute(
|
||||
"DELETE FROM sentences WHERE video_hash = ?",
|
||||
(normalized_hash,),
|
||||
)
|
||||
connection.execute(
|
||||
"DELETE FROM moss_segments WHERE video_hash = ?",
|
||||
(normalized_hash,),
|
||||
)
|
||||
connection.execute(
|
||||
"""
|
||||
UPDATE videos
|
||||
SET status = ?, error_message = NULL, transcription = NULL, updated_at = ?
|
||||
WHERE video_hash = ?
|
||||
""",
|
||||
("processing", utc_now(), normalized_hash),
|
||||
)
|
||||
|
||||
def mark_failed(self, video_hash: str, message: str) -> None:
|
||||
self._update_status(video_hash, "failed", message[:4000])
|
||||
|
||||
Reference in New Issue
Block a user