mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-04-28 03:30:10 +00:00
fix selfhost streaming issue (#2576)
Co-authored-by: lawyzheng <lawyzheng1106@gmail.com>
This commit is contained in:
parent
db856cd843
commit
f27c2cd92d
2 changed files with 9 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -6,6 +6,7 @@ log.txt
|
|||
log-ingestion.txt
|
||||
logs
|
||||
*.log
|
||||
current.json
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ from skyvern.forge.sdk.schemas.tasks import TaskStatus
|
|||
from skyvern.forge.sdk.workflow.models.workflow import WorkflowRunStatus
|
||||
from skyvern.schemas.runs import RunEngine, RunType
|
||||
from skyvern.services import task_v2_service
|
||||
from skyvern.utils.files import initialize_skyvern_state_file
|
||||
|
||||
LOG = structlog.get_logger()
|
||||
|
||||
|
|
@ -106,6 +107,7 @@ class BackgroundTaskExecutor(AsyncExecutor):
|
|||
context.max_steps_override = max_steps_override
|
||||
|
||||
if background_tasks:
|
||||
await initialize_skyvern_state_file(task_id=task_id, organization_id=organization_id)
|
||||
background_tasks.add_task(
|
||||
app.agent.execute_step,
|
||||
organization,
|
||||
|
|
@ -135,6 +137,9 @@ class BackgroundTaskExecutor(AsyncExecutor):
|
|||
)
|
||||
|
||||
if background_tasks:
|
||||
await initialize_skyvern_state_file(
|
||||
workflow_run_id=workflow_run_id, organization_id=organization.organization_id
|
||||
)
|
||||
background_tasks.add_task(
|
||||
app.WORKFLOW_SERVICE.execute_workflow,
|
||||
workflow_run_id=workflow_run_id,
|
||||
|
|
@ -178,6 +183,9 @@ class BackgroundTaskExecutor(AsyncExecutor):
|
|||
)
|
||||
|
||||
if background_tasks:
|
||||
await initialize_skyvern_state_file(
|
||||
workflow_run_id=task_v2.workflow_run_id, organization_id=organization_id
|
||||
)
|
||||
background_tasks.add_task(
|
||||
task_v2_service.run_task_v2,
|
||||
organization=organization,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue