Spaces:
Sleeping
Sleeping
Commit ·
8586027
1
Parent(s): e97c360
Fix status API: single worker for queue consistency, exclude tmp files from list
Browse files- Dockerfile +2 -2
- video_creator/short_creator.py +4 -1
Dockerfile
CHANGED
|
@@ -41,5 +41,5 @@ ENV DOCKER=true
|
|
| 41 |
ENV LOG_LEVEL=info
|
| 42 |
ENV WHISPER_MODEL=tiny.en
|
| 43 |
|
| 44 |
-
# Start the server
|
| 45 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8880", "--workers", "
|
|
|
|
| 41 |
ENV LOG_LEVEL=info
|
| 42 |
ENV WHISPER_MODEL=tiny.en
|
| 43 |
|
| 44 |
+
# Start the server (MUST use single worker to maintain queue state!)
|
| 45 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8880", "--workers", "1", "--timeout-keep-alive", "3600"]
|
video_creator/short_creator.py
CHANGED
|
@@ -365,8 +365,11 @@ class ShortCreator:
|
|
| 365 |
"""List all videos with their status"""
|
| 366 |
videos = []
|
| 367 |
|
| 368 |
-
# Get all MP4 files
|
| 369 |
for video_file in self.config.videos_dir_path.glob("*.mp4"):
|
|
|
|
|
|
|
|
|
|
| 370 |
video_id = video_file.stem
|
| 371 |
videos.append({
|
| 372 |
"id": video_id,
|
|
|
|
| 365 |
"""List all videos with their status"""
|
| 366 |
videos = []
|
| 367 |
|
| 368 |
+
# Get all MP4 files (exclude temp files)
|
| 369 |
for video_file in self.config.videos_dir_path.glob("*.mp4"):
|
| 370 |
+
# Skip temp files (*.tmp.mp4)
|
| 371 |
+
if ".tmp." in video_file.name:
|
| 372 |
+
continue
|
| 373 |
video_id = video_file.stem
|
| 374 |
videos.append({
|
| 375 |
"id": video_id,
|