track backup creation time on restore start (#918)
## Type of change - [x] 🐹 Trivial/Minor ## Issue(s) * #894 ## Test Plan - [x] 💪 Manual
This commit is contained in:
parent
824f02469c
commit
679b32697b
@ -28,17 +28,18 @@ const (
|
||||
RestoreEnd = "restore-end"
|
||||
|
||||
// Event Data Keys
|
||||
BackupID = "backup-id"
|
||||
DataRetrieved = "data-retrieved"
|
||||
DataStored = "data-stored"
|
||||
Duration = "duration"
|
||||
EndTime = "end-time"
|
||||
ItemsRead = "items-read"
|
||||
ItemsWritten = "items-written"
|
||||
Resources = "resources"
|
||||
Service = "service"
|
||||
StartTime = "start-time"
|
||||
Status = "status"
|
||||
BackupCreateTime = "backup-creation-time"
|
||||
BackupID = "backup-id"
|
||||
DataRetrieved = "data-retrieved"
|
||||
DataStored = "data-stored"
|
||||
Duration = "duration"
|
||||
EndTime = "end-time"
|
||||
ItemsRead = "items-read"
|
||||
ItemsWritten = "items-written"
|
||||
Resources = "resources"
|
||||
Service = "service"
|
||||
StartTime = "start-time"
|
||||
Status = "status"
|
||||
)
|
||||
|
||||
type Eventer interface {
|
||||
|
||||
@ -95,7 +95,6 @@ func (op *BackupOperation) Run(ctx context.Context) (err error) {
|
||||
events.StartTime: startTime,
|
||||
events.Service: op.Selectors.Service.String(),
|
||||
// TODO: initial backup ID,
|
||||
// TODO: events.ExchangeResources: <count of resources>,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@ -86,21 +86,6 @@ type restoreStats struct {
|
||||
func (op *RestoreOperation) Run(ctx context.Context) (err error) {
|
||||
startTime := time.Now()
|
||||
|
||||
// TODO: persist initial state of restoreOperation in modelstore
|
||||
op.bus.Event(
|
||||
ctx,
|
||||
events.RestoreStart,
|
||||
map[string]any{
|
||||
events.StartTime: startTime,
|
||||
events.Service: op.Selectors.Service.String(),
|
||||
events.BackupID: op.BackupID,
|
||||
// TODO: initial backup ID,
|
||||
// TODO: events.ExchangeResources: <count of resources>,
|
||||
// TODO: source backup time,
|
||||
// TODO: restore options,
|
||||
},
|
||||
)
|
||||
|
||||
// persist operation results to the model store on exit
|
||||
opStats := restoreStats{}
|
||||
// TODO: persist results?
|
||||
@ -121,6 +106,18 @@ func (op *RestoreOperation) Run(ctx context.Context) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO: persist initial state of restoreOperation in modelstore
|
||||
op.bus.Event(
|
||||
ctx,
|
||||
events.RestoreStart,
|
||||
map[string]any{
|
||||
events.StartTime: startTime,
|
||||
events.BackupID: op.BackupID,
|
||||
events.BackupCreateTime: b.CreationTime,
|
||||
// TODO: restore options,
|
||||
},
|
||||
)
|
||||
|
||||
var fds *details.Details
|
||||
|
||||
switch op.Selectors.Service {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user