Skip to content

Automate browser based workflows with AI

fix successful steps count (#1457)

Shuchang Zheng8c08edfb787c
diff --git a/skyvern/forge/sdk/workflow/service.py b/skyvern/forge/sdk/workflow/service.py
index fdb822eb8..82b7f8aea 100644
--- a/skyvern/forge/sdk/workflow/service.py
+++ b/skyvern/forge/sdk/workflow/service.py
@@ -836,7 +836,7 @@ class WorkflowService:
total_steps = len(workflow_run_steps)
# TODO: This is a temporary cost calculation. We need to implement a more accurate cost calculation.
# successful steps are the ones that have a status of completed and the total count of unique step.order
- successful_steps = set(step.order for step in workflow_run_steps if step.status == StepStatus.completed)
+ successful_steps = [step for step in workflow_run_steps if step.status == StepStatus.completed]
total_cost = 0.1 * len(successful_steps)
return WorkflowRunStatusResponse(
workflow_id=workflow.workflow_permanent_id,