Skip to content

Commit 0638604

Browse files
committed
Fix tests
1 parent f0d3819 commit 0638604

File tree

1 file changed

+4
-2
lines changed
  • apps/sim/app/api/schedules/execute

1 file changed

+4
-2
lines changed

apps/sim/app/api/schedules/execute/route.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ export async function GET(request: NextRequest) {
8787

8888
const jobQueue = await getJobQueue()
8989

90+
const workflowUtils =
91+
dueSchedules.length > 0 ? await import('@/lib/workflows/utils') : undefined
92+
9093
const schedulePromises = dueSchedules.map(async (schedule) => {
9194
const queueTime = schedule.lastQueuedAt ?? queuedAt
9295
const executionId = generateId()
@@ -115,9 +118,8 @@ export async function GET(request: NextRequest) {
115118
}
116119

117120
try {
118-
const { getWorkflowById } = await import('@/lib/workflows/utils')
119121
const resolvedWorkflow = schedule.workflowId
120-
? await getWorkflowById(schedule.workflowId)
122+
? await workflowUtils?.getWorkflowById(schedule.workflowId)
121123
: null
122124
const resolvedWorkspaceId = resolvedWorkflow?.workspaceId
123125

0 commit comments

Comments
 (0)