-
Notifications
You must be signed in to change notification settings - Fork 0
Blackboxai/avi cache scan #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| ## Convertify 2.0 - Mejoras pendientes | ||
|
|
||
| - [x] 1) main.py: loggear excepciones con logger.exception en vez de `sys.exit(1)` silencioso | ||
| - [x] 2) Semántica SKIPPED vs FAILED: | ||
| - [x] Ajustar `VideoConversionService` para que “locked/skip” no cuente como FAILED (definir success=True o que main.py discrimine SKIPPED) | ||
| - [x] 3) (Siguiente) Timeout configurable para FFmpeg en `MoviePyVideoConverter` | ||
| - [x] 4) (Siguiente) Paralelismo real respetando `max_workers` | ||
| - [ ] 5) (Siguiente) Optimizar locked-check (psutil fallback/caching) | ||
| - [ ] 6) (Siguiente) Centralizar configuración de rutas UNC | ||
| - [ ] 7) (Siguiente) Tests adicionales para semántica SKIPPED y timeout |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,8 +90,26 @@ def convert(self, video_file: VideoFile, config: ConversionConfig) -> Conversion | |
| cmd.insert(1, "-threads") | ||
| cmd.insert(2, str(config.threads)) | ||
|
|
||
| # Run ffmpeg conversion | ||
| result = subprocess.run(cmd, capture_output=True, text=True, check=False) | ||
| # Run ffmpeg conversion (with optional timeout) | ||
| run_kwargs: dict = { | ||
| "capture_output": True, | ||
| "text": True, | ||
| "check": False, | ||
| } | ||
| if config.ffmpeg_timeout_seconds and config.ffmpeg_timeout_seconds > 0: | ||
| run_kwargs["timeout"] = config.ffmpeg_timeout_seconds | ||
|
|
||
| try: | ||
| result = subprocess.run(cmd, **run_kwargs) | ||
| except subprocess.TimeoutExpired: | ||
| return ConversionResult( | ||
|
Comment on lines
+104
to
+105
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| video_file=video_file, | ||
| success=False, | ||
| error_message=( | ||
| f"FFmpeg timeout after {config.ffmpeg_timeout_seconds}s" | ||
| ), | ||
| duration_seconds=time.time() - start_time, | ||
| ) | ||
|
|
||
| if result.returncode != 0: | ||
| error_msg = f"FFmpeg error: {result.stderr}" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the cache reports exactly one new or modified subdirectory,
len(dirs_to_scan) == 1makes this fall back toscan_roots = [directory], so a common incremental case still performs a fullrglobover the entire UNC tree.DirectoryCache.get_directories_to_scan()already uses{root_dir}to request a full scan and can return a singleton{subdir}for one changed folder, so the extra length check defeats the intended cache optimization.Useful? React with 👍 / 👎.