mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-03 11:47:42 +01:00
Stabilize blocker release wake test
This commit is contained in:
1 parent
b174c8cef3
commit
cb4b14e0a9
1 file changed
+7
-3
@@ -551,12 +551,16 @@ describeEmbeddedPostgres("heartbeat dependency-aware queued run selection", () =
|
||||
|
||||
finishReleaseRun();
|
||||
await waitForCondition(async () => {
|
||||
const run = await db
|
||||
.select({ status: heartbeatRuns.status })
|
||||
const row = await db
|
||||
.select({
|
||||
runStatus: heartbeatRuns.status,
|
||||
wakeStatus: agentWakeupRequests.status,
|
||||
})
|
||||
.from(heartbeatRuns)
|
||||
.leftJoin(agentWakeupRequests, eq(agentWakeupRequests.id, heartbeatRuns.wakeupRequestId))
|
||||
.where(eq(heartbeatRuns.id, releasedWake!.id))
|
||||
.then((rows) => rows[0] ?? null);
|
||||
return run?.status === "succeeded";
|
||||
return row?.runStatus === "succeeded" && row.wakeStatus === "completed";
|
||||
});
|
||||
|
||||
const blockerReleaseRunCount = await db
|
||||
|
||||
Reference in new issue
Block a user