Store screenshot artifacts, generate URLs when needed (#4506)
This commit is contained in:
@@ -638,11 +638,11 @@ async def _update_workflow_block(
|
||||
except asyncio.TimeoutError:
|
||||
LOG.warning("Timeout getting downloaded files", task_id=task_id)
|
||||
|
||||
task_screenshots = await app.WORKFLOW_SERVICE.get_recent_task_screenshot_urls(
|
||||
task_screenshot_artifacts = await app.WORKFLOW_SERVICE.get_recent_task_screenshot_artifacts(
|
||||
organization_id=context.organization_id,
|
||||
task_id=task_id,
|
||||
)
|
||||
workflow_screenshots = await app.WORKFLOW_SERVICE.get_recent_workflow_screenshot_urls(
|
||||
workflow_screenshot_artifacts = await app.WORKFLOW_SERVICE.get_recent_workflow_screenshot_artifacts(
|
||||
workflow_run_id=context.workflow_run_id,
|
||||
organization_id=context.organization_id,
|
||||
)
|
||||
@@ -650,8 +650,8 @@ async def _update_workflow_block(
|
||||
task_output = TaskOutput.from_task(
|
||||
updated_task,
|
||||
downloaded_files,
|
||||
task_screenshots=task_screenshots,
|
||||
workflow_screenshots=workflow_screenshots,
|
||||
task_screenshot_artifact_ids=[a.artifact_id for a in task_screenshot_artifacts],
|
||||
workflow_screenshot_artifact_ids=[a.artifact_id for a in workflow_screenshot_artifacts],
|
||||
)
|
||||
final_output = task_output.model_dump()
|
||||
step_for_billing: Step | None = None
|
||||
|
||||
Reference in New Issue
Block a user