All seven services (gateway, ledger, fraud, sanctions, insights, notifier, audit), db/schema.sql plus optional_indexes.sql, scripts/seed.py and smoke.py, the gateway-served frontend, and docker-compose.yml. Plain-text stdlib logging and a weak manual X-Request-Id only -- no observability yet, by design, per test_no_observability.py. Implements all 13 named chaos-flag pathologies from docs/PATHOLOGIES.md behind Redis-backed runtime flags. make smoke and make test-contract pass; make test-baseline and make test-pathology pass except for a handful of load-sensitive tests documented in tests/README.md rather than papered over.
28 lines
815 B
Python
28 lines
815 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
|
|
service_name: str = "unknown"
|
|
|
|
postgres_dsn: str = "postgresql+asyncpg://ledgerline:ledgerline@postgres:5432/ledgerline"
|
|
redis_url: str = "redis://redis:6379/0"
|
|
|
|
gateway_url: str = "http://gateway:8000"
|
|
ledger_url: str = "http://ledger:8001"
|
|
fraud_url: str = "http://fraud:8002"
|
|
sanctions_url: str = "http://sanctions:8003"
|
|
insights_url: str = "http://insights:8004"
|
|
notifier_url: str = "http://notifier:8005"
|
|
|
|
downstream_timeout_seconds: float = 3.0
|
|
|
|
stream_name: str = "stream:transactions"
|
|
|
|
summary_cache_ttl_seconds: int = 900
|
|
summary_cache_ttl_seconds_cold: int = 60
|
|
|
|
|
|
settings = Settings()
|