fix: gc history update_time (#16847)

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
This commit is contained in:
Shengwen YU 2022-05-12 15:45:01 +08:00 committed by GitHub
parent 8a2c86ff94
commit 991a3180f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -218,7 +218,7 @@ func convertExecution(exec *task.Execution) *Execution {
Trigger: exec.Trigger,
ExtraAttrs: exec.ExtraAttrs,
StartTime: exec.StartTime,
EndTime: exec.EndTime,
UpdateTime: exec.UpdateTime,
}
}

View File

@ -26,7 +26,7 @@ type TriggerSettings struct {
Cron string `json:"cron"`
}
// Execution model for replication
// Execution model for gc
type Execution struct {
ID int64
Status string
@ -34,10 +34,10 @@ type Execution struct {
Trigger string
ExtraAttrs map[string]interface{}
StartTime time.Time
EndTime time.Time
UpdateTime time.Time
}
// Task model for replication
// Task model for gc
type Task struct {
ID int64
ExecutionID int64

View File

@ -168,7 +168,7 @@ func (g *gcAPI) GetGCHistory(ctx context.Context, params operation.GetGCHistoryP
},
Status: exec.Status,
CreationTime: exec.StartTime,
UpdateTime: exec.EndTime,
UpdateTime: exec.UpdateTime,
})
}
@ -207,7 +207,7 @@ func (g *gcAPI) GetGC(ctx context.Context, params operation.GetGCParams) middlew
Type: exec.Trigger,
},
CreationTime: exec.StartTime,
UpdateTime: exec.EndTime,
UpdateTime: exec.UpdateTime,
}
return operation.NewGetGCOK().WithPayload(res.ToSwagger())