Log message push errors

This commit is contained in:
Kailash Nadh 2018-11-06 16:33:46 +05:30
parent 6d96986b3a
commit a4e829136a
1 changed files with 4 additions and 1 deletions

View File

@ -185,11 +185,14 @@ func (r *Runner) SpawnWorkers() {
for {
select {
case m := <-ch:
r.messengers[m.Campaign.MessengerID].Push(
err := r.messengers[m.Campaign.MessengerID].Push(
m.Campaign.FromEmail,
m.Subscriber.Email,
m.Campaign.Subject,
m.Body)
if err != nil {
r.logger.Printf("error pushing message: %v", err)
}
}
}
}(r.msgQueue)