Skip to content

Commit 8863ff0

Browse files
authored
fix(engine): limit the number of snapshots returned when getting latest snapshots since (#2550)
1 parent d10281e commit 8863ff0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal-packages/run-engine/src/engine/systems/executionSnapshotSystem.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,11 @@ export async function getExecutionSnapshotsSince(
216216
completedWaitpoints: true,
217217
checkpoint: true,
218218
},
219-
orderBy: { createdAt: "asc" },
219+
orderBy: { createdAt: "desc" },
220+
take: 50,
220221
});
221222

222-
return snapshots.map(enhanceExecutionSnapshot);
223+
return snapshots.reverse().map(enhanceExecutionSnapshot);
223224
}
224225

225226
export class ExecutionSnapshotSystem {

0 commit comments

Comments
 (0)