From 0b1036cf920b11a9b553abec63d015e6c2d59b99 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Tue, 26 Mar 2024 15:25:50 +0100 Subject: [PATCH] fix: logic change: don't return from WAITING to NEW when the expectation 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. --- .../src/evaluationRunner/evaluateExpectationStates/waiting.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts index e0fc3d2d..ade07e31 100644 --- a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts +++ b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts @@ -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, })