Skip to content

Commit

Permalink
Move pickedServerChan definition before where it is used.
Browse files Browse the repository at this point in the history
This helps reduces the mental effort to recognize the fact that
the variable is not used elsewhere.
  • Loading branch information
justicezyx committed Aug 24, 2016
1 parent 5039f84 commit bd59341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/scheduler/scheduler_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func (s *Scheduler) EventLoop() {
case SubmitTaskGroup:
// fmt.Printf("processing %+v\n", event)
taskGroup := event.TaskGroup
pickedServerChan := make(chan market.Supply, 1)
go func() {
defer event.WaitGroup.Done()
tasks := event.TaskGroup.Tasks
Expand All @@ -44,6 +43,7 @@ func (s *Scheduler) EventLoop() {
s.shardLocator.waitForInputDatasetShardLocations(tasks[0])
// fmt.Printf("inputs of %s is %s\n", tasks[0].Name(), s.allInputLocations(tasks[0]))

pickedServerChan := make(chan market.Supply, 1)
s.Market.AddDemand(market.Requirement(taskGroup), event.Bid, pickedServerChan)

// get assigned executor location
Expand Down

0 comments on commit bd59341

Please sign in to comment.