Remove duplicate completion notifications from backup/restore screens
The app-level on_job_finished handler already shows these. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -72,21 +72,13 @@ class BackupScreen(Screen):
|
|||||||
args = ["backup", f"--target={target}"]
|
args = ["backup", f"--target={target}"]
|
||||||
if remote:
|
if remote:
|
||||||
args.append(f"--remote={remote}")
|
args.append(f"--remote={remote}")
|
||||||
rc = await job_manager.run_job(self.app, job, *args)
|
await job_manager.run_job(self.app, job, *args)
|
||||||
if rc == 0:
|
|
||||||
self.notify("Backup completed successfully", severity="information")
|
|
||||||
else:
|
|
||||||
self.notify(f"Backup failed (exit code {rc})", severity="error")
|
|
||||||
|
|
||||||
@work
|
@work
|
||||||
async def _do_backup_all(self) -> None:
|
async def _do_backup_all(self) -> None:
|
||||||
job = job_manager.create_job("backup", "Backup All Targets")
|
job = job_manager.create_job("backup", "Backup All Targets")
|
||||||
self.notify("Backup All started -- view in Running Tasks")
|
self.notify("Backup All started -- view in Running Tasks")
|
||||||
rc = await job_manager.run_job(self.app, job, "backup", "--all")
|
await job_manager.run_job(self.app, job, "backup", "--all")
|
||||||
if rc == 0:
|
|
||||||
self.notify("All backups completed", severity="information")
|
|
||||||
else:
|
|
||||||
self.notify(f"Backup failed (exit code {rc})", severity="error")
|
|
||||||
|
|
||||||
def action_go_back(self) -> None:
|
def action_go_back(self) -> None:
|
||||||
self.app.pop_screen()
|
self.app.pop_screen()
|
||||||
|
|||||||
@@ -152,11 +152,7 @@ class RestoreScreen(Screen):
|
|||||||
args.append(f"--dest={dest}")
|
args.append(f"--dest={dest}")
|
||||||
if skip_mysql:
|
if skip_mysql:
|
||||||
args.append("--skip-mysql")
|
args.append("--skip-mysql")
|
||||||
rc = await job_manager.run_job(self.app, job, *args)
|
await job_manager.run_job(self.app, job, *args)
|
||||||
if rc == 0:
|
|
||||||
self.notify("Restore completed successfully", severity="information")
|
|
||||||
else:
|
|
||||||
self.notify(f"Restore failed (exit code {rc})", severity="error")
|
|
||||||
|
|
||||||
def action_go_back(self) -> None:
|
def action_go_back(self) -> None:
|
||||||
self.app.pop_screen()
|
self.app.pop_screen()
|
||||||
|
|||||||
Reference in New Issue
Block a user