Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Should not schedule task if there is failed previous task

天舟929e763e8a7e
diff --git a/server/pipeline.go b/server/pipeline.go
index 58c639d54a..47fbe104aa 100644
--- a/server/pipeline.go
+++ b/server/pipeline.go
@@ -47,6 +47,11 @@ func (s *Server) ComposePipelineRelationship(ctx context.Context, pipeline *api.
func (s *Server) ScheduleNextTaskIfNeeded(ctx context.Context, pipeline *api.Pipeline) error {
for _, stage := range pipeline.StageList {
for _, task := range stage.TaskList {
+ // Should short circuit upon reaching failed task.
+ if task.Status == api.TaskFailed {
+ return nil
+ }
+
skipIfAlreadyDone := true
if task.Status == api.TaskPendingApproval {
return s.TaskCheckScheduler.ScheduleCheckIfNeeded(ctx, task, api.SYSTEM_BOT_ID, skipIfAlreadyDone)