26 lines
674 B
Python
26 lines
674 B
Python
from pydantic_settings import BaseSettings
|
|
from typing import Optional
|
|
|
|
class Settings(BaseSettings):
|
|
# MongoDB Configuration
|
|
mongodb_url: str = "mongodb://mongodb:27017"
|
|
db_name: str = "rss_feed_db"
|
|
|
|
# Redis Configuration
|
|
redis_url: str = "redis://redis:6379"
|
|
redis_db: int = 3
|
|
|
|
# Feed Settings
|
|
default_update_interval: int = 900 # 15 minutes in seconds
|
|
max_entries_per_feed: int = 100
|
|
fetch_timeout: int = 30
|
|
|
|
# Scheduler Settings
|
|
enable_scheduler: bool = True
|
|
scheduler_timezone: str = "Asia/Seoul"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
env_file_encoding = "utf-8"
|
|
|
|
settings = Settings() |