added parameter in config file to disable backup job

This commit is contained in:
carnivuth
2026-02-22 16:01:39 +01:00
parent bba89d0ec5
commit d8220b2429
6 changed files with 20 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ class Config:
# backup job settings
backups_path: str = "backups"
backups_enabled: bool = False
backups_cron: str = "*/30 * * * *"
# Database settings
database_path: str = "data/krawl.db"
@@ -195,6 +196,7 @@ class Config:
probability_error_codes=behavior.get("probability_error_codes", 0),
exports_path=exports.get("path"),
backups_path=backups.get("path"),
backups_enabled=backups.get("enabled",False),
backups_cron=backups.get("cron"),
database_path=database.get("path", "data/krawl.db"),
database_retention_days=database.get("retention_days", 30),

View File

@@ -16,7 +16,7 @@ app_logger = get_app_logger()
TASK_CONFIG = {
"name": "dump-krawl-data",
"cron": f"{config.backups_cron}",
"enabled": True,
"enabled": config.backups_enabled,
"run_when_loaded": True,
}