Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Francesco Casula <fracasula@users.noreply.github.com>
  • Loading branch information
Sidddddarth and fracasula committed Feb 6, 2024
1 parent bb61082 commit 219e603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions router/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ func (rt *Handle) findWorkerSlot(ctx context.Context, workers []*worker, job *jo
"destinationId": parameters.DestinationID,
}).Increment()
}
abortedJob, abortReason := rt.drainOrRetryLimitReached(job) // if job's aborted, then send it to it's worker right away
abortedJob, abortReason := rt.drainOrRetryLimitReached(job) // if job's aborted, then send it to its worker right away
if eventOrderingDisabled {
availableWorkers := lo.Filter(workers, func(w *worker, _ int) bool { return w.AvailableSlots() > 0 })
if len(availableWorkers) == 0 {
Expand Down Expand Up @@ -629,7 +629,7 @@ func (rt *Handle) retryLimitReached(status *jobsdb.JobStatusT) bool {
return false
}

if respStatusCode < 500 {
if respStatusCode < http.StatusInternalServerError {
return false
}

Expand Down

0 comments on commit 219e603

Please sign in to comment.