Skip to content

Commit

Permalink
Fix a few more errors introduced in attempting to resolve issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSheps committed Jan 23, 2024
1 parent ce4b278 commit d46e519
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions netbox_config_backup/models/backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions netbox_config_backup/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit d46e519

Please sign in to comment.