bump drone-yaml library to 1.2.3

pull/2905/head
Brad Rydzewski 2020-01-17 09:33:16 -08:00
parent a000a4e7a3
commit ed97110e88
3 changed files with 7 additions and 2 deletions

2
go.mod
View File

@ -20,7 +20,7 @@ require (
github.com/drone/drone-go v1.0.6
github.com/drone/drone-runtime v1.1.0
github.com/drone/drone-ui v0.0.0-20191004020100-87de5a7c28a9
github.com/drone/drone-yaml v1.2.3-0.20191031071139-9036725284d3
github.com/drone/drone-yaml v1.2.3
github.com/drone/envsubst v1.0.1
github.com/drone/go-license v1.0.2
github.com/drone/go-login v1.0.4-0.20190311170324-2a4df4f242a2

2
go.sum
View File

@ -132,6 +132,8 @@ github.com/drone/drone-yaml v1.2.3-0.20190924213155-be6b37e0b4cd h1:xbC7iwsybaLu
github.com/drone/drone-yaml v1.2.3-0.20190924213155-be6b37e0b4cd/go.mod h1:QsqliFK8nG04AHFN9tTn9XJomRBQHD4wcejWW1uz/10=
github.com/drone/drone-yaml v1.2.3-0.20191031071139-9036725284d3 h1:tUvugKpWy7VSClNaRbt14XxebGWDmkethAgJPrfu+1M=
github.com/drone/drone-yaml v1.2.3-0.20191031071139-9036725284d3/go.mod h1:QsqliFK8nG04AHFN9tTn9XJomRBQHD4wcejWW1uz/10=
github.com/drone/drone-yaml v1.2.3 h1:SWzLmzr8ARhbtw1WsVDENa8WFY2Pi9l0FVMfafVUWz8=
github.com/drone/drone-yaml v1.2.3/go.mod h1:QsqliFK8nG04AHFN9tTn9XJomRBQHD4wcejWW1uz/10=
github.com/drone/envsubst v1.0.1 h1:NOOStingM2sbBwsIUeQkKUz8ShwCUzmqMxWrpXItfPE=
github.com/drone/envsubst v1.0.1/go.mod h1:bkZbnc/2vh1M12Ecn7EYScpI4YGYU0etwLJICOWi8Z0=
github.com/drone/go-license v1.0.2 h1:7OwndfYk+Lp/cGHkxe4HUn/Ysrrw3WYH2pnd99yrkok=

View File

@ -46,11 +46,14 @@ type Scheduler struct {
// Start starts the cron scheduler.
func (s *Scheduler) Start(ctx context.Context, dur time.Duration) error {
ticker := time.NewTicker(dur)
defer ticker.Stop()
for {
select {
case <-ctx.Done():
return ctx.Err()
case <-time.After(dur):
case <-ticker.C:
s.run(ctx)
}
}