Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Refacter calls to task.id to task.ID()
Browse files Browse the repository at this point in the history
  • Loading branch information
geauxvirtual committed Oct 8, 2015
1 parent e9286a8 commit 62bded4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func (s *scheduler) StartTask(id string) []perror.PulseError {
}

event := new(scheduler_event.TaskStartedEvent)
event.TaskID = t.id
event.TaskID = t.ID()
defer s.eventManager.Emit(event)
t.Spin()
s.logger.WithFields(log.Fields{
Expand Down Expand Up @@ -287,13 +287,13 @@ func (s *scheduler) StopTask(id string) []perror.PulseError {
for i, plugin := range plugins {
cps[i] = plugin
}
errs := s.metricManager.UnsubscribeDeps(id, mts, cps)
errs := s.metricManager.UnsubscribeDeps(t.ID(), mts, cps)
if len(errs) > 0 {
return errs
}

event := new(scheduler_event.TaskStoppedEvent)
event.TaskID = t.id
event.TaskID = t.ID()
defer s.eventManager.Emit(event)
t.Stop()
s.logger.WithFields(log.Fields{
Expand Down Expand Up @@ -343,7 +343,7 @@ func (s *scheduler) SetMetricManager(mm managesMetrics) {
//
func (s *scheduler) WatchTask(id string, tw core.TaskWatcherHandler) (core.TaskWatcherCloser, error) {
if task := s.tasks.Get(id); task != nil {
a, b := s.taskWatcherColl.add(id, tw)
a, b := s.taskWatcherColl.add(task.ID(), tw)
return a, b
}
return nil, ErrTaskNotFound
Expand Down

0 comments on commit 62bded4

Please sign in to comment.