Skip to content

Commit

Permalink
refactor: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
yohamta committed Mar 29, 2024
1 parent 4a703a8 commit 294ee59
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions internal/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,22 +378,6 @@ func (sc *Scheduler) setup() (err error) {
return
}

func handleError(node *Node) {
status := node.GetStatus()
if status != NodeStatusCancel && status != NodeStatusSuccess {
if node.step.RetryPolicy != nil && node.step.RetryPolicy.Limit > node.getRetryCount() {
log.Printf("%s failed but scheduled for retry", node.step.Name)
node.incRetryCount()
log.Printf("sleep %s for retry", node.step.RetryPolicy.Interval)
time.Sleep(node.step.RetryPolicy.Interval)
node.setRetriedAt(time.Now())
node.setStatus(NodeStatusNone)
} else {
node.setStatus(NodeStatusError)
}
}
}

func (sc *Scheduler) setCanceled() {
sc.mu.Lock()
defer sc.mu.Unlock()
Expand Down

0 comments on commit 294ee59

Please sign in to comment.