Skip to content

Commit

Permalink
Refactor TaskRecorder to remove unnecessary subworkflow serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
srijanpatel committed Dec 3, 2024
1 parent b5ee821 commit 0467f87
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions backend/app/execution/task_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@ def create_task(
self,
node_id: str,
inputs: Dict[str, Any],
subworkflow: Optional[WorkflowDefinitionSchema] = None,
):
if subworkflow:
subworkflow_val = subworkflow.model_dump()
else:
subworkflow_val = None
task = TaskModel(
run_id=self.run_id,
node_id=node_id,
inputs=inputs,
subworkflow=subworkflow_val,
)
self.db.add(task)
self.db.commit()
Expand Down Expand Up @@ -61,5 +55,6 @@ def update_task(
task.subworkflow_output = {
k: v.model_dump() for k, v in subworkflow_output.items()
}
self.db.add(task)
self.db.commit()
return

0 comments on commit 0467f87

Please sign in to comment.