Skip to content

Commit

Permalink
Ignore misconfigured global tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin committed Sep 29, 2012
1 parent b077782 commit 3ee492e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,11 @@ func runPeriodicJob(name string, job *PeriodicJob) {

func runPeriodicJobs() {
for n, j := range periodicJobs {
go runPeriodicJob(n, j)
if j.period() == 0 {
log.Printf("%v is misconfigured, ignoring", n)
} else {
go runPeriodicJob(n, j)
}
}
}

Expand Down

0 comments on commit 3ee492e

Please sign in to comment.