code: func (s *AttachedScheduler) Tasks(ctx context.Context, app string) ([]*twelvefactor.Task, error) {
  	if !s.ShowAttached {
  		return s.Scheduler.Tasks(ctx, app)
  	}
  
  	type instancesResult struct {
  		instances []*twelvefactor.Task
  		err       error
  	}
  
  	ch := make(chan instancesResult, 1)
  	go func() {
  		attachedInstances, err := s.dockerScheduler.InstancesFromAttachedRuns(ctx, app)
  		ch <- instancesResult{attachedInstances, err}
  	}()
  
  	instances, err := s.Scheduler.Tasks(ctx, app)
  	if err != nil {
  		return instances, err
  	}
  
  	result := <-ch
  	if err := result.err; err != nil {
  		return instances, err
  	}
  
  	return append(instances, result.instances...), nil
  }
docs: // Tasks returns a combination of instances from the wrapped scheduler, as
  // well as instances from attached runs.