Files
pobsync/src/pobsync_backend/config_source.py
Peter van Arkel bb44f8a09c refactor: inject config sources into scheduled backups
Introduce a ConfigSource interface so scheduled backups no longer need
to load host configuration directly from runtime YAML. Add a Django-backed
config source for SQL-driven backup runs, keep file-based config as the
CLI default, and make scheduled prune execution actually apply retention
after successful runs.
2026-05-19 04:57:10 +02:00

13 lines
367 B
Python

from __future__ import annotations
from typing import Any
from pobsync.config.merge import build_effective_config
from .config_repository import global_config_data, host_config_data
class DjangoConfigSource:
def effective_config_for_host(self, host: str) -> dict[str, Any]:
return build_effective_config(global_config_data(), host_config_data(host))