fix(savepoint): periodically savepoint bug
This commit is contained in:
parent
444cfc7061
commit
699cf12f72
@ -43,8 +43,9 @@ func (job ManagedJob) trackSavepoint() error {
|
||||
return v1alpha1.ErrNoSavepointTriggerId
|
||||
}
|
||||
resp, err := job.client.TrackSavepoint(*job.def.Status.JobId, *job.def.Status.SavepointTriggerId)
|
||||
pkg.Logger.Debug("[managed-job] [savepoint] track savepoint",
|
||||
pkg.Logger.Info("[managed-job] [savepoint] savepoint track result",
|
||||
zap.Any("status.Id", resp.Status.Id),
|
||||
zap.Any("path", resp.Operation.Location),
|
||||
zap.Any("failureCause.stacktrace", resp.Operation.FailureCause.StackTrace),
|
||||
zap.Any("failureCause.class", resp.Operation.FailureCause.Class),
|
||||
zap.Error(err),
|
||||
@ -69,8 +70,9 @@ func (job ManagedJob) trackSavepoint() error {
|
||||
if resp.Status.Id == api.SavepointStatusInCompleted {
|
||||
job.crd.Patch(job.def.UID, map[string]interface{}{
|
||||
"status": map[string]interface{}{
|
||||
"lastSavepointPath": resp.Operation.Location,
|
||||
"lastSavepointDate": time.Now().Format(time.RFC3339),
|
||||
"savepointTriggerId": nil,
|
||||
"lastSavepointPath": resp.Operation.Location,
|
||||
"lastSavepointDate": time.Now().Format(time.RFC3339),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user