#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
配置文件
"""

import os
from typing import Optional


class Settings:
    """应用设置"""

    # 服务配置
    HOST: str = "0.0.0.0"
    PORT: int = 8003
    DEBUG: bool = False

    # Blender配置
    BLENDER_PATH: Optional[str] = os.getenv("BLENDER_PATH")
    BLENDER_TIMEOUT: int = 300  # 5分钟

    # 文件存储配置
    RENDER_OUTPUT_DIR: str = "/data/Isometquick/"
    MAX_FILE_AGE_HOURS: int = 24  # 24小时后清理文件

    # 日志配置
    LOG_LEVEL: str = "INFO"
    LOG_FORMAT: str = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"

    # 限制配置
    MAX_CONCURRENT_RENDERS: int = 3
    MAX_QUEUE_SIZE: int = 10


settings = Settings()
