fix(syncer): retry startup task publication failures (#22101)

This commit is contained in:
Sbaaoui Idriss authored and GitHub committed 2026-11-06 19:07:19 +08:00
1 parent e2baf6d511
commit c1711a2be1
1 file changed
+5 -1
+5 -1
View File
@@ -143,7 +143,11 @@ func (s *Scheduler) publishStartupTasks(ctx context.Context) error {
for _, task := range tasks {
if err = s.ScheduleTask(ctx, task); err != nil {
return err
if ctx.Err() != nil {
return ctx.Err()
}
common.Warn("syncer scheduler startup task publish failed", zap.String("task_id", task.ID), zap.Error(err))
s.ScheduleTaskAfter(ctx, task.ID, 3*time.Second)
}
}
if len(tasks) < scheduledTaskStartupPageSize {