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

Commit

Permalink
use StartTask for startOnCreate
Browse files Browse the repository at this point in the history
`StartTask` has logging and event emittance which was not being used in
creation if startOnCreate was true.

fixes #391
  • Loading branch information
pittma committed Oct 21, 2015
1 parent e0f08df commit a86a47e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,10 @@ func (s *scheduler) CreateTask(sch schedule.Schedule, wfMap *wmap.WorkflowMap, s
"task-id": task.ID(),
}).Info("starting task on creation")

cps := returnCorePlugin(plugins)
errs := s.metricManager.SubscribeDeps(task.ID(), mts, cps)
if len(errs) > 0 {
errs := s.StartTask(task.id)
if errs != nil {
te.errs = append(te.errs, errs...)
return nil, te
}

task.Spin()
}

return task, te
Expand Down

0 comments on commit a86a47e

Please sign in to comment.