feat(savepoint): create and track for getting savepoint location
This commit is contained in:
@@ -58,14 +58,14 @@ func (job *ManagedJob) cycle() {
|
||||
if errors.Is(err, ErrNoJobId) {
|
||||
job.state = nil
|
||||
}
|
||||
if job.state.LastSavepointDate == nil || time.Now().Add(-time.Minute*3).After(*job.state.LastSavepointDate) {
|
||||
if job.state.SavepointTriggerId == nil {
|
||||
job.createSavepoint()
|
||||
} else {
|
||||
job.trackSavepoint()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//if job.state.LastSavepointDate == nil || time.Now().Add(-time.Minute*3).After(*job.state.LastSavepointDate) {
|
||||
err := job.createSavepoint()
|
||||
if errors.Is(err, ErrNoJobId) {
|
||||
job.state = nil
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user