feat: Enhance API interactions and improve job handling with new request validation and error management

This commit is contained in:
2026-03-06 12:03:41 +08:00
parent 3844e825cd
commit a93754f449
15 changed files with 204 additions and 74 deletions

View File

@@ -58,8 +58,7 @@ class Settings(BaseSettings):
def validate(self):
if self.SECRET_KEY == "your-secret-key-change-this-in-production":
import warnings
warnings.warn("Using default SECRET_KEY! Change this in production!")
raise ValueError("Insecure default SECRET_KEY is not allowed. Please set a strong SECRET_KEY in environment.")
Path(self.CACHE_DIR).mkdir(parents=True, exist_ok=True)
Path(self.OUTPUT_DIR).mkdir(parents=True, exist_ok=True)