Skip to content

Commit fdf0bf6

Browse files
committed
Fix for the wrong type when blocking a run
1 parent 0642c9c commit fdf0bf6

File tree

1 file changed

+2
-2
lines changed
  • internal-packages/run-engine/src/engine

1 file changed

+2
-2
lines changed

internal-packages/run-engine/src/engine/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ export class RunEngine {
15941594
let snapshot: TaskRunExecutionSnapshot = await getLatestExecutionSnapshot(prisma, runId);
15951595

15961596
//block the run with the waitpoints, returning how many waitpoints are pending
1597-
const insert = await prisma.$queryRaw<{ pending_count: number }[]>`
1597+
const insert = await prisma.$queryRaw<{ pending_count: BigInt }[]>`
15981598
WITH inserted AS (
15991599
INSERT INTO "TaskRunWaitpoint" ("id", "taskRunId", "waitpointId", "projectId", "createdAt", "updatedAt")
16001600
SELECT
@@ -1614,7 +1614,7 @@ export class RunEngine {
16141614
JOIN "Waitpoint" w ON w.id = i."waitpointId"
16151615
WHERE w.status = 'PENDING';`;
16161616

1617-
const pendingCount = insert.at(0)?.pending_count ?? 0;
1617+
const pendingCount = Number(insert.at(0)?.pending_count ?? 0);
16181618

16191619
let newStatus: TaskRunExecutionStatus = "BLOCKED_BY_WAITPOINTS";
16201620
if (

0 commit comments

Comments
 (0)