Skip to content

Commit

Permalink
fix: logic change: don't return from WAITING to NEW when the expectat…
Browse files Browse the repository at this point in the history
…ion isn't ready to be worked on.

Reason: We should stay in waiting, since there should be no need to return to NEW (ie to do a new query for available workers), since at this poing we do have a worker assigned. Better then to simply stay at waiting to reduce the amount of unnecessary queries.
  • Loading branch information
nytamin committed Mar 26, 2024
1 parent 45ba26a commit 0b1036c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export async function evaluateExpectationStateWaiting({
})
} else {
// Not ready to start because of some other reason (e.g. the source doesn't exist)
// Stay here in WAITING state:
tracker.trackedExpectationAPI.updateTrackedExpectationStatus(trackedExp, {
state: ExpectedPackageStatusAPI.WorkStatusState.NEW,
reason: readyToStart.reason,
status: newStatus,
})
Expand Down

0 comments on commit 0b1036c

Please sign in to comment.