code: func (c *Coordinator) claimExistingTasks() {
  	tasks, err := c.Store.ListTasks(context.Background(), backend.TaskSearchParams{})
  	if err != nil {
  		c.logger.Error("failed to list tasks", zap.Error(err))
  		return
  	}
  
  	for len(tasks) > 0 {
  		for _, task := range tasks {
  			t := task // Copy to avoid mistaken closure around task value.
  			if err := c.sch.ClaimTask(&t.Task, &t.Meta); err != nil {
  				c.logger.Error("failed claim task", zap.Error(err))
  				continue
  			}
  		}
  		tasks, err = c.Store.ListTasks(context.Background(), backend.TaskSearchParams{
  			After: tasks[len(tasks)-1].Task.ID,
  		})
  		if err != nil {
  			c.logger.Error("failed list additional tasks", zap.Error(err))
  			return
  		}
  	}
  }
docs: // claimExistingTasks is called on startup to claim all tasks in the store.