1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-21 23:33:13 +00:00

Notify after post_backup_tasks. By @TheLazron (#1940)

This commit is contained in:
Aryaman Sharma 2024-04-07 22:35:04 +05:30 committed by GitHub
parent 7642002573
commit 3268bf1599
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -459,6 +459,7 @@ def post_backup_tasks(self, profile_id):
Pruning and checking after successful backup.
"""
profile = BackupProfileModel.get(id=profile_id)
notifier = VortaNotifications.pick()
logger.info('Doing post-backup jobs for %s', profile.name)
if profile.prune_on:
msg = BorgPruneJob.prepare(profile)
@ -489,6 +490,11 @@ def post_backup_tasks(self, profile_id):
self.app.jobs_manager.add_job(job)
logger.info('Finished background task for profile %s', profile.name)
notifier.deliver(
self.tr('Vorta Backup'),
self.tr('Post Backup Tasks successful for %s' % profile.name),
level='info',
)
def remove_job(self, profile_id):
if profile_id in self.timers: