summaryrefslogtreecommitdiff
path: root/checkjobs.go
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-09-14 22:37:06 +0200
committerKevin Chabowski <kevin@kch42.de>2013-09-14 22:37:06 +0200
commitc0a06609919d09fbcb6326ff69cc455dd13506ef (patch)
tree7a56a337f9ac3b9b3fc099ea846fd884112469b7 /checkjobs.go
parent33c32f1e026482d60de635656a53de723114fcb7 (diff)
downloadmailremind-c0a06609919d09fbcb6326ff69cc455dd13506ef.tar.gz
mailremind-c0a06609919d09fbcb6326ff69cc455dd13506ef.tar.bz2
mailremind-c0a06609919d09fbcb6326ff69cc455dd13506ef.zip
Reduced duplicate code for config reading.
Diffstat (limited to 'checkjobs.go')
-rw-r--r--checkjobs.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/checkjobs.go b/checkjobs.go
index 2b4af74..c053dd5 100644
--- a/checkjobs.go
+++ b/checkjobs.go
@@ -3,6 +3,7 @@ package main
import (
"bytes"
"fmt"
+ "kch42.de/gostuff/mailremind/confhelper"
"kch42.de/gostuff/mailremind/model"
"log"
"time"
@@ -11,10 +12,7 @@ import (
var checkInterval int64
func initCheckjobs() {
- var err error
- if checkInterval, err = conf.GetInt("schedules", "checkInterval"); err != nil {
- log.Fatalf("Could not read config schedules.checkInterval: %s", err)
- }
+ checkInterval = confhelper.ConfIntOrFatal(conf, "schedules", "checkInterval")
}
func checkjobs() {