remind: Maybe don't busyloop

This commit is contained in:
Hamcha 2017-05-31 19:08:47 +02:00
parent 377aa68cb6
commit 48ff3fe479

View file

@ -43,7 +43,7 @@ func initremind() {
log.Println("[remind] WARN: Could not load pending reminders (malformed or unreadable file): " + err.Error())
return
}
for id, _ := range reminders {
for id := range reminders {
go runreminder(id)
}
log.Printf("[remind] Loaded %d pending reminders from %s\n", len(reminders), *remindpath)
@ -111,6 +111,7 @@ func runreminder(id string) {
// In case this is called in the init, wait until the broker is available
for broker == nil {
// Wait
time.Sleep(time.Second)
}
// Get reminder