@@ -539,39 +539,21 @@ async def event_logic(queue: asyncio.Queue):
539539
540540 await queue .put (await format_event ("status" , {"status" : "executing" , "msg" : (f"Executing branch: { branch_id } ..." if branch_id else f"Executing blueprint: { blueprint_id } ..." )}))
541541
542- if branch_id :
543- task = asyncio .create_task (
544- app_runner .handle_event (
545- session_id ,
546- WriterEvent (
547- type = "wf-run-blueprint-via-api" ,
548- isSafe = True ,
549- handler = "run_blueprint_via_api" ,
550- payload = {
551- "blueprint_id" : blueprint_id ,
552- "trigger_type" : "Cron" ,
553- "branch_id" : branch_id ,
554- ** (payload or {})
555- },
556- )
557- )
558- )
559- else :
560- task = asyncio .create_task (
561- app_runner .handle_event (
562- session_id ,
563- WriterEvent (
564- type = "wf-run-blueprint-via-api" ,
565- isSafe = True ,
566- handler = "run_blueprint_via_api" ,
567- payload = {
568- "blueprint_id" : blueprint_id ,
569- "trigger_type" : "API" ,
570- ** (payload or {})
571- },
572- )
542+ task = asyncio .create_task (
543+ app_runner .handle_event (
544+ session_id ,
545+ WriterEvent (
546+ type = "wf-run-blueprint-via-api" ,
547+ isSafe = True ,
548+ handler = "run_blueprint_via_api" ,
549+ payload = {
550+ "blueprint_id" : blueprint_id ,
551+ "branch_id" : branch_id ,
552+ ** (payload or {})
553+ },
573554 )
574555 )
556+ )
575557
576558 await queue .put (await format_event ("status" , {"status" : "running" , "msg" : ("Branch is running. Awaiting output..." if branch_id else "Blueprint is running. Awaiting output..." )}))
577559
0 commit comments