mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 18:46:24 +05:00
Add logging in case of incorrect amqp credentials fixes #644
This commit is contained in:
committed by
Dan Christian Bogos
parent
31d420c3ba
commit
31268fde28
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user