remind: Maybe don't busyloop

This commit is contained in:
Hamcha 2017-05-31 19:08:47 +02:00
parent 377aa68cb6
commit 48ff3fe479
1 changed files with 2 additions and 1 deletions

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