File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
apps/sim/app/api/workflows/[id]/execute Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ const ExecuteWorkflowSchema = z.object({
118118export const runtime = 'nodejs'
119119export const dynamic = 'force-dynamic'
120120
121+ const INLINE_TRIGGER_TYPES = new Set < CoreTriggerType > ( [ 'manual' , 'workflow' ] )
122+
121123function resolveOutputIds (
122124 selectedOutputs : string [ ] | undefined ,
123125 blocks : Record < string , any >
@@ -789,7 +791,7 @@ async function handleExecutePost(
789791
790792 const executionVariables = cachedWorkflowData ?. variables ?? workflow . variables ?? { }
791793
792- if ( shouldUseBullMQ ( ) && triggerType !== 'manual' ) {
794+ if ( shouldUseBullMQ ( ) && ! INLINE_TRIGGER_TYPES . has ( triggerType ) ) {
793795 try {
794796 const dispatchJobId = await enqueueDirectWorkflowExecution (
795797 {
@@ -989,7 +991,7 @@ async function handleExecutePost(
989991 }
990992
991993 if ( shouldUseDraftState ) {
992- const shouldDispatchViaQueue = shouldUseBullMQ ( ) && triggerType !== 'manual'
994+ const shouldDispatchViaQueue = shouldUseBullMQ ( ) && ! INLINE_TRIGGER_TYPES . has ( triggerType )
993995 if ( shouldDispatchViaQueue ) {
994996 const metadata : ExecutionMetadata = {
995997 requestId,
You can’t perform that action at this time.
0 commit comments