Log message push errors
This commit is contained in:
parent
6d96986b3a
commit
a4e829136a
|
@ -185,11 +185,14 @@ func (r *Runner) SpawnWorkers() {
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case m := <-ch:
|
case m := <-ch:
|
||||||
r.messengers[m.Campaign.MessengerID].Push(
|
err := r.messengers[m.Campaign.MessengerID].Push(
|
||||||
m.Campaign.FromEmail,
|
m.Campaign.FromEmail,
|
||||||
m.Subscriber.Email,
|
m.Subscriber.Email,
|
||||||
m.Campaign.Subject,
|
m.Campaign.Subject,
|
||||||
m.Body)
|
m.Body)
|
||||||
|
if err != nil {
|
||||||
|
r.logger.Printf("error pushing message: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}(r.msgQueue)
|
}(r.msgQueue)
|
||||||
|
|
Loading…
Reference in New Issue