🔧(summary) make audio duration limit optional for deployment safety
Allow deploying without breaking changes while frontend implements proper egress limit handling. Duration restriction can be enabled when ready.
This commit is contained in:
committed by
aleb_the_flash
parent
731f0471aa
commit
e87d0519ff
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user