mirror of
https://github.com/bellingcat/whisperbox-transcribe.git
synced 2026-06-07 19:18:35 +03:00
22 lines
415 B
Python
22 lines
415 B
Python
import sys
|
|
|
|
from pydantic import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
API_SECRET: str
|
|
DATABASE_URI: str
|
|
ENVIRONMENT: str
|
|
|
|
TASK_SOFT_TIME_LIMIT: int = 3 * 60 * 60
|
|
TASK_HARD_TIME_LIMIT: int = 4 * 60 * 60
|
|
|
|
# derived settings
|
|
BROKER_URL: str
|
|
|
|
|
|
if "pytest" in sys.modules:
|
|
settings = Settings(_env_file=".env.test") # type: ignore
|
|
else:
|
|
settings = Settings() # type: ignore
|