mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-04 18:53:10 +00:00
feature(backups): report the error text in a job
This commit is contained in:
parent
de52dffdda
commit
02b03cf401
|
@ -283,7 +283,7 @@ class Backups:
|
||||||
Backups._store_last_snapshot(tag, snapshot)
|
Backups._store_last_snapshot(tag, snapshot)
|
||||||
service.post_restore()
|
service.post_restore()
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
Jobs.update(job, status=JobStatus.ERROR)
|
Jobs.update(job, status=JobStatus.ERROR, status_text=str(error))
|
||||||
raise error
|
raise error
|
||||||
|
|
||||||
Jobs.update(job, status=JobStatus.FINISHED)
|
Jobs.update(job, status=JobStatus.FINISHED)
|
||||||
|
@ -348,7 +348,7 @@ class Backups:
|
||||||
service.post_restore()
|
service.post_restore()
|
||||||
|
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
Jobs.update(job, status=JobStatus.ERROR)
|
Jobs.update(job, status=JobStatus.ERROR, status_text=str(error))
|
||||||
raise error
|
raise error
|
||||||
|
|
||||||
Jobs.update(job, status=JobStatus.FINISHED)
|
Jobs.update(job, status=JobStatus.FINISHED)
|
||||||
|
|
Loading…
Reference in a new issue