Skip to content

Commit

Permalink
fix: subtasks always get skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
klesh committed Apr 1, 2024
1 parent cbcaaae commit f162af8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/core/runner/run_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func RunPluginSubTasks(
if !subtaskMeta.ForceRunOnResume {
sfc := errors.Must1(
basicRes.GetDal().Count(
dal.From(&models.Subtask{}), dal.Where("task_id = ? AND name = ?", task.ID, subtaskMeta.Name),
dal.From(&models.Subtask{}), dal.Where("task_id = ? AND name = ? AND finished_at IS NOT NULL", task.ID, subtaskMeta.Name),
),
)
subtaskFinsied = sfc > 0
Expand Down

0 comments on commit f162af8

Please sign in to comment.