fix: Add text description for the main stage of backup

This commit is contained in:
Inex Code 2024-12-23 21:22:30 +03:00
parent f8edc2d276
commit d5a3fb3928
No known key found for this signature in database

View file

@ -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)