File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 sanitize_filename ,
3636)
3737
38+
39+ class SentinelVideoProcessingError (Exception ):
40+ """Raised when Sentinel video processing fails before file relocation."""
41+
3842# --- WebSocket Manager ---
3943class ConnectionManager :
4044 def __init__ (self ):
@@ -359,7 +363,8 @@ async def sentinel_loop():
359363 try :
360364 initial_size = file_path .stat ().st_size
361365 await asyncio .sleep (1 )
362- if not file_path .exists (): continue
366+ if not file_path .exists ():
367+ continue
363368 final_size = file_path .stat ().st_size
364369 if initial_size != final_size :
365370 continue # Still writing
@@ -421,7 +426,7 @@ async def sentinel_loop():
421426 if success :
422427 processed_path = Path (out_path ) if out_path else None
423428 else :
424- raise Exception (msg )
429+ raise SentinelVideoProcessingError (msg )
425430
426431 # Move original to sentinel-mode/originals
427432 dest_original = _build_unique_destination (sentinel_originals_dir , file_path .name )
You can’t perform that action at this time.
0 commit comments