From e87d0519ff83cba0e1d4fc4fbe311ba18a8cc164 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Fri, 11 Jul 2025 10:20:26 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(summary)=20make=20audio=20duration?= =?UTF-8?q?=20limit=20optional=20for=20deployment=20safety?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow deploying without breaking changes while frontend implements proper egress limit handling. Duration restriction can be enabled when ready. --- src/summary/summary/core/celery_worker.py | 2 +- src/summary/summary/core/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/summary/summary/core/celery_worker.py b/src/summary/summary/core/celery_worker.py index a464a352..d8360c84 100644 --- a/src/summary/summary/core/celery_worker.py +++ b/src/summary/summary/core/celery_worker.py @@ -269,7 +269,7 @@ def process_audio_transcribe_summarize_v2( audio_file = File(temp_file_path) metadata_manager.track(task_id, {"audio_length": audio_file.info.length}) - if audio_file.info.length > settings.recording_max_duration: + if settings.recording_max_duration is not None and audio_file.info.length > settings.recording_max_duration: error_msg = "Recording too long: %.2fs > %.2fs limit" % ( audio_file.info.length, settings.recording_max_duration, diff --git a/src/summary/summary/core/config.py b/src/summary/summary/core/config.py index 9b5af0c0..f996aefa 100644 --- a/src/summary/summary/core/config.py +++ b/src/summary/summary/core/config.py @@ -17,7 +17,7 @@ class Settings(BaseSettings): app_api_token: str # Audio recordings - recording_max_duration: int = 5400 # 1h30 + recording_max_duration: Optional[int] = None # Celery settings celery_broker_url: str = "redis://redis/0"