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) 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/',