feat(managed-job): add restore from failed state

This commit is contained in:
2024-12-01 00:56:16 +03:30
parent 64e84c8d0f
commit dd700b6007
7 changed files with 68 additions and 16 deletions

View File

@@ -33,7 +33,7 @@ func (job ManagedJob) trackSavepoint() error {
return ErrNoSavepointTriggerId
}
resp, err := job.client.TrackSavepoint(*job.state.JobId, *job.state.SavepointTriggerId)
lc.Logger.Debug("[managed-job] [savepoint] track savepoint", zap.Any("resp", resp), zap.Error(err))
lc.Logger.Debug("[managed-job] [savepoint] track savepoint", zap.Any("status.Id", resp.Status.Id), zap.Any("failureCause.stacktrace", resp.Operation.FailureCause.StackTrace), zap.Error(err))
if err != nil {
if strings.IndexAny(err.Error(), "http status not 2xx: 404") == 0 {
job.removeSavepointTriggerId()