fix url check

This commit is contained in:
Volobuev Andrey
2025-08-26 17:39:11 +03:00
parent 0e2fc14732
commit 2f8aea3620
11 changed files with 28331 additions and 374 deletions

View File

@@ -22,7 +22,8 @@ from superset_tool.utils.fileio import (
archive_exports,
sanitize_filename,
consolidate_archive_folders,
remove_empty_directories
remove_empty_directories,
RetentionPolicy
)
from superset_tool.utils.init_clients import setup_clients
@@ -36,6 +37,7 @@ class BackupConfig:
consolidate: bool = True
rotate_archive: bool = True
clean_folders: bool = True
retention_policy: RetentionPolicy = RetentionPolicy()
# [ENTITY: Function('backup_dashboards')]
# CONTRACT:
@@ -84,7 +86,7 @@ def backup_dashboards(
)
if config.rotate_archive:
archive_exports(str(dashboard_dir), logger=logger)
archive_exports(str(dashboard_dir), policy=config.retention_policy, logger=logger)
success_count += 1
except (SupersetAPIError, RequestException, IOError, OSError) as db_error: