Skip to content

Commit 36c7cc9

Browse files
committed
fix(api): compute pause queue positions over the whole pending queue
1 parent 7cc22a7 commit 36c7cc9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/sim/lib/workflows/executor/execution-status.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,8 @@ export async function readPausedRunPoints(input: {
662662
.limit(1)
663663
if (!row) return null
664664

665+
// Positions count the whole pending queue, so it is read unpaged: it holds a few columns per
666+
// waiting point, never more than the `pause_points` already loaded above.
665667
const pendingResumes = await db
666668
.select({
667669
contextId: resumeQueue.contextId,
@@ -671,7 +673,6 @@ export async function readPausedRunPoints(input: {
671673
.from(resumeQueue)
672674
.where(and(eq(resumeQueue.parentExecutionId, executionId), eq(resumeQueue.status, 'pending')))
673675
.orderBy(resumeQueue.queuedAt)
674-
.limit(MAX_PAUSED_RUN_POINTS)
675676
const queuePositions = PauseResumeManager.computeQueuePositions(
676677
pendingResumes.map((entry) => ({
677678
contextId: entry.contextId,

0 commit comments

Comments
 (0)