support passing run_with for run_task endpoint (mostly for task v2) (#4576)
This commit is contained in:
@@ -209,6 +209,7 @@ async def initialize_task_v2(
|
||||
browser_session_id=browser_session_id,
|
||||
extra_http_headers=extra_http_headers,
|
||||
browser_address=browser_address,
|
||||
run_with=run_with,
|
||||
),
|
||||
workflow_permanent_id=new_workflow.workflow_permanent_id,
|
||||
organization=organization,
|
||||
@@ -755,10 +756,11 @@ async def run_task_v2_helper(
|
||||
context=context,
|
||||
screenshots=scraped_page.screenshots,
|
||||
)
|
||||
await app.WORKFLOW_SERVICE.generate_script_if_needed(
|
||||
workflow=workflow,
|
||||
workflow_run=workflow_run,
|
||||
)
|
||||
if task_v2.run_with == "code":
|
||||
await app.WORKFLOW_SERVICE.generate_script_if_needed(
|
||||
workflow=workflow,
|
||||
workflow_run=workflow_run,
|
||||
)
|
||||
break
|
||||
|
||||
if not plan:
|
||||
|
||||
Reference in New Issue
Block a user