return success state of the backup from wings
This commit is contained in:
parent
43d8bd656a
commit
138080d5e2
|
@ -94,6 +94,13 @@ func (s *Server) Backup(b backup.BackupInterface) error {
|
||||||
}).Warn("failed to notify panel of failed backup state")
|
}).Warn("failed to notify panel of failed backup state")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s.Events().PublishJson(BackupCompletedEvent+":"+b.Identifier(), map[string]interface{}{
|
||||||
|
"uuid": b.Identifier(),
|
||||||
|
"is_successful": false,
|
||||||
|
"sha256_hash": "",
|
||||||
|
"file_size": 0,
|
||||||
|
})
|
||||||
|
|
||||||
return errors.WithStack(err)
|
return errors.WithStack(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +116,7 @@ func (s *Server) Backup(b backup.BackupInterface) error {
|
||||||
// the frontend for the server.
|
// the frontend for the server.
|
||||||
s.Events().PublishJson(BackupCompletedEvent+":"+b.Identifier(), map[string]interface{}{
|
s.Events().PublishJson(BackupCompletedEvent+":"+b.Identifier(), map[string]interface{}{
|
||||||
"uuid": b.Identifier(),
|
"uuid": b.Identifier(),
|
||||||
|
"is_successful": true,
|
||||||
"sha256_hash": ad.Checksum,
|
"sha256_hash": ad.Checksum,
|
||||||
"file_size": ad.Size,
|
"file_size": ad.Size,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user