scheduler: fix linter errors

Fix errors reported by default golangci-lint linters
This commit is contained in:
Simone Gotti 2019-07-02 15:56:14 +02:00
parent e508993d93
commit f80cb15cd6
1 changed files with 5 additions and 5 deletions

View File

@ -190,6 +190,7 @@ func NewScheduler(c *config.Scheduler) (*Scheduler, error) {
}
return &Scheduler{
c: c,
runserviceClient: rsapi.NewClient(c.RunserviceURL),
}, nil
}
@ -198,9 +199,8 @@ func (s *Scheduler) Run(ctx context.Context) error {
go s.scheduleLoop(ctx)
go s.approveLoop(ctx)
select {
case <-ctx.Done():
log.Infof("scheduler exiting")
return nil
}
<-ctx.Done()
log.Infof("scheduler exiting")
return nil
}