feat(logging): load dotenv early and improve logging config

This commit is contained in:
Phlogi
2025-08-26 16:55:00 +02:00
parent c54a441228
commit da982e44b8
2 changed files with 21 additions and 15 deletions

View File

@@ -5,6 +5,9 @@ import threading
import os
import sys
from dotenv import load_dotenv
load_dotenv()
# Import Celery task utilities
from .celery_config import get_config_params, MAX_CONCURRENT_DL
@@ -161,7 +164,7 @@ class CeleryManager:
queues="utility_tasks,default", # Listen to utility and default
concurrency=5, # Increased concurrency for SSE updates and utility tasks
worker_name_suffix="utw", # Utility Worker
log_level_env=os.getenv("LOG_LEVEL", "ERROR").upper(),
log_level_env=os.getenv("LOG_LEVEL", "WARNING").upper(),
)
logger.info(