From d5a3fb3928abdb3600bb9bfe22300a4ad7fddb5e Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 23 Dec 2024 21:22:30 +0300 Subject: [PATCH] fix: Add text description for the main stage of backup --- selfprivacy_api/backup/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfprivacy_api/backup/__init__.py b/selfprivacy_api/backup/__init__.py index a540c8b..2a068a8 100644 --- a/selfprivacy_api/backup/__init__.py +++ b/selfprivacy_api/backup/__init__.py @@ -249,6 +249,7 @@ class Backups: folders = service.get_folders() service_name = service.get_id() service.pre_backup(job=job) + Jobs.update(job, status=JobStatus.RUNNING, status_text="Uploading backup") snapshot = Backups.provider().backupper.start_backup( folders, service_name, @@ -263,7 +264,7 @@ class Backups: Jobs.update(job, status=JobStatus.ERROR, error=str(error)) raise error - Jobs.update(job, status=JobStatus.FINISHED) + Jobs.update(job, status=JobStatus.FINISHED, result="Backup finished") if reason in [BackupReason.AUTO, BackupReason.PRE_RESTORE]: Jobs.set_expiration(job, AUTOBACKUP_JOB_EXPIRATION_SECONDS) return Backups.sync_date_from_cache(snapshot)