File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
apps/sim/app/api/schedules/execute Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments