"""Exness forex tick cache seeder configuration.

Seeds bigblack's local tick cache from Exness daily archives so that
forex tick data is available for bar construction and analysis.

Mirrors the Binance SeederConfig pattern but with Exness-specific defaults:
- 1-hour timer interval (not 5-min -- lower volume, no rush)
- 4 concurrent downloads (not 12 -- only 10 symbols)
- Historical start 2022-01-01 (Exness Raw Spread archive availability)
"""

from __future__ import annotations

from pydantic_settings import BaseSettings, SettingsConfigDict


class ExnessSeederConfig(BaseSettings):
    """Exness tick cache seeder configuration.

    Environment Variables
    ---------------------
    OPENDEVIATIONBAR_EXNESS_SEEDER_HISTORICAL_START : str
        Earliest date to seed (YYYY-MM-DD). Per-symbol effective_start in
        symbols.toml overrides this when it is later (default: "2022-01-01").
    OPENDEVIATIONBAR_EXNESS_SEEDER_MAX_CONCURRENT_DOWNLOADS : int
        Concurrent Exness ZIP downloads per run (default: 4).
        Exness has zero rate limiting; 4 is plenty for 10 symbols.
    OPENDEVIATIONBAR_EXNESS_SEEDER_DOWNLOAD_TIMEOUT_S : int
        HTTP timeout for Exness ZIP downloads in seconds (default: 60).
    OPENDEVIATIONBAR_EXNESS_SEEDER_STATE_FILE : str
        Path to state file written on completion (read by monit health check).
        Default: "/var/tmp/opendeviationbar-exness-seeder-state.txt"
    """

    model_config = SettingsConfigDict(
        env_prefix="OPENDEVIATIONBAR_EXNESS_SEEDER_",
        case_sensitive=False,
    )

    historical_start: str = "2022-01-01"
    max_concurrent_downloads: int = 4
    download_timeout_s: int = 60
    state_file: str = "/var/tmp/opendeviationbar-exness-seeder-state.txt"
