Skip to content

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

fix: skip task belongs to archived instance (#1494)

qsliua1dbd8540949
diff --git a/server/task_scheduler.go b/server/task_scheduler.go
index 4d3005bf45..95a4f83e4d 100644
--- a/server/task_scheduler.go
+++ b/server/task_scheduler.go
@@ -105,6 +105,11 @@ func (s *TaskScheduler) Run(ctx context.Context, wg *sync.WaitGroup) {
continue
}
+ // Skip task belongs to archived instances
+ if i := task.Instance; i == nil || i.RowStatus == api.Archived {
+ continue
+ }
+
executor, ok := s.executors[task.Type]
if !ok {
log.Error("Skip running task with unknown type",