code: func New(store *store.MemoryStore) *Scheduler {
  	return &Scheduler{
  		store:                   store,
  		unassignedTasks:         make(map[string]*api.Task),
  		pendingPreassignedTasks: make(map[string]*api.Task),
  		preassignedTasks:        make(map[string]struct{}),
  		allTasks:                make(map[string]*api.Task),
  		stopChan:                make(chan struct{}),
  		doneChan:                make(chan struct{}),
  		pipeline:                NewPipeline(),
  	}
  }
docs: // New creates a new scheduler.