@danhachuel/thunderbolt 0.6.96 → 0.6.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -41,6 +41,8 @@ PIPELINE_LOG_FILENAME = "pipeline_worker.json"
|
|
|
41
41
|
VIDEO_TIMEOUT_SECONDS = 20 * 60
|
|
42
42
|
LONG_STOCK_VIDEO_TIMEOUT_SECONDS = 90 * 60
|
|
43
43
|
VIDEO_IDLE_TIMEOUT_SECONDS = 10 * 60
|
|
44
|
+
# O helper do MoneyPrinterTurbo pode ficar silencioso durante downloads/API.
|
|
45
|
+
# Mantemos uma janela de inactividade maior para Pixabay, sem remover o watchdog.
|
|
44
46
|
STOCK_VIDEO_IDLE_TIMEOUT_SECONDS = 30 * 60
|
|
45
47
|
STALE_TASK_SECONDS = VIDEO_TIMEOUT_SECONDS + 5 * 60
|
|
46
48
|
WORKER_HEARTBEAT_TIMEOUT_SECONDS = 15
|
|
@@ -718,23 +720,25 @@ def _material_video_routes(task: dict[str, Any], settings: dict[str, Any]) -> li
|
|
|
718
720
|
|
|
719
721
|
|
|
720
722
|
def _video_timeout_seconds(task: dict[str, Any], settings: dict[str, Any] | None = None) -> int:
|
|
721
|
-
"""Reserve extra bounded time
|
|
723
|
+
"""Reserve extra bounded time for long stock-video downloads and assembly."""
|
|
722
724
|
effective_settings = settings if isinstance(settings, dict) else _settings()
|
|
723
725
|
route = _normalise_video_route(task, effective_settings)
|
|
724
726
|
script = str(task.get("video_script") or "").strip()
|
|
725
|
-
if route
|
|
727
|
+
if route == "pixabay" or (route == "pexels" and len(script) >= 1_200):
|
|
726
728
|
return max(VIDEO_TIMEOUT_SECONDS, LONG_STOCK_VIDEO_TIMEOUT_SECONDS)
|
|
727
729
|
return VIDEO_TIMEOUT_SECONDS
|
|
728
730
|
|
|
729
731
|
|
|
730
732
|
def _video_idle_timeout_seconds(task: dict[str, Any], settings: dict[str, Any] | None = None) -> int:
|
|
731
|
-
"""Allow
|
|
733
|
+
"""Allow Pixabay downloads to stay quiet without treating them as hung."""
|
|
732
734
|
configured = VIDEO_IDLE_TIMEOUT_SECONDS
|
|
733
735
|
if configured <= 0:
|
|
734
736
|
return configured
|
|
735
737
|
effective_settings = settings if isinstance(settings, dict) else _settings()
|
|
736
738
|
route = _normalise_video_route(task, effective_settings)
|
|
737
|
-
if route
|
|
739
|
+
if route == "pixabay":
|
|
740
|
+
return max(configured, STOCK_VIDEO_IDLE_TIMEOUT_SECONDS)
|
|
741
|
+
if route == "pexels":
|
|
738
742
|
return max(configured, STOCK_VIDEO_IDLE_TIMEOUT_SECONDS)
|
|
739
743
|
return configured
|
|
740
744
|
|
package/package.json
CHANGED