Give each workflow run a parent task with no agent
This commit is contained in:
@@ -94,6 +94,9 @@ func (m *Manager) startAudit(ctx context.Context, projectID string) error {
|
||||
return nil
|
||||
}
|
||||
for _, t := range tasks {
|
||||
if t.WorkflowStage == nil {
|
||||
continue
|
||||
}
|
||||
m.auditError(ctx, t, fmt.Sprintf("The audit of %s didn't start: %v. Discard this task to let audits continue; the next commit on %s starts one.", short(head), err, project.DefaultBranch))
|
||||
}
|
||||
return err
|
||||
@@ -126,7 +129,7 @@ func (m *Manager) dismissAudit(taskID string) {
|
||||
slog.Error("dismiss audit", "task", taskID, "err", err)
|
||||
return
|
||||
}
|
||||
if !task.Background || task.Status != api.TaskStatusActive {
|
||||
if !task.Background || task.Status != api.TaskStatusActive || task.WorkflowStage == nil {
|
||||
return
|
||||
}
|
||||
output, _, err := m.store.StageResult(ctx, taskID)
|
||||
|
||||
Reference in New Issue
Block a user