Add logging in case of incorrect amqp credentials fixes #644

This commit is contained in:
TeoV
2018-11-20 05:06:17 -05:00
committed by Dan Christian Bogos
parent 31d420c3ba
commit 31268fde28

View File

@@ -197,10 +197,12 @@ func (pstr *AMQPPoster) Post(chn *amqp.Channel, contentType string, content []by
time.Sleep(time.Duration(fib()) * time.Second)
}
if err != nil && fallbackFileName != utils.META_NONE {
utils.Logger.Warning(fmt.Sprintf("<AMQPPoster> creating new post channel, err: %s", err.Error()))
err = pstr.writeToFile(fallbackFileName, content)
return nil, err
}
}
for i := 0; i < pstr.attempts; i++ {
if err = chn.Publish(
"", // exchange