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.
13 lines
367 B
Python
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))
|