From ce4b2786f825eb108fc132440430511e6601348a Mon Sep 17 00:00:00 2001 From: Daniel Sheppard Date: Tue, 23 Jan 2024 12:52:49 -0600 Subject: [PATCH 1/2] PRVB --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 758207b..4336d65 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='netbox_config_backup', - version='1.5.3', + version='1.5.4', description='NetBox Configuration Backup', long_description='Plugin to backup device configuration', url='https://github.com/dansheps/netbox-config-backup/', From d46e519137258270bb345ac3932f9e254b032715 Mon Sep 17 00:00:00 2001 From: Daniel Sheppard Date: Tue, 23 Jan 2024 14:22:35 -0600 Subject: [PATCH 2/2] Fix a few more errors introduced in attempting to resolve issues --- netbox_config_backup/models/backups.py | 2 ++ netbox_config_backup/tasks.py | 1 + 2 files changed, 3 insertions(+) diff --git a/netbox_config_backup/models/backups.py b/netbox_config_backup/models/backups.py index 02cdefb..4f2ee6f 100644 --- a/netbox_config_backup/models/backups.py +++ b/netbox_config_backup/models/backups.py @@ -87,6 +87,8 @@ def get_config(self, index='HEAD'): return {'running': running if running is not None else '', 'startup': startup if startup is not None else ''} def set_config(self, configs, files=('running', 'startup'), pk=None): + from netbox_config_backup.models.repository import (BackupCommit, BackupObject, BackupFile, + BackupCommitTreeChange) from netbox_config_backup.git import repository LOCAL_TIMEZONE = datetime.datetime.now(datetime.timezone.utc).astimezone().tzinfo diff --git a/netbox_config_backup/tasks.py b/netbox_config_backup/tasks.py index bb924e0..b643ac8 100644 --- a/netbox_config_backup/tasks.py +++ b/netbox_config_backup/tasks.py @@ -164,6 +164,7 @@ def backup_job(pk): except Exception as e: logger.error(f'Uncaught Exception on job: {backup}') logger.error(e) + logger.warning(traceback.format_exc()) job_result.set_status(JobResultStatusChoices.STATUS_ERRORED) BackupJob.enqueue_if_needed(backup, delay=delay, job_id=job_result.job_id)