Skip to content
Snippets Groups Projects

Resolve "Investigate GitLab-CI services don't reach each other"

Compare and Show latest version
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
@@ -82,15 +82,16 @@ func NewEventService() (interfaces.Service, error) {
func connect(addr string) (*amqp.Connection, error) {
var err error
// Will equal 2 Minuten of retries
// Will equal two Minuten of retries
retries := 60
for i := 0; i < retries; i++ {
conn, err := amqp.Dial(addr)
if err == nil {
logrus.Debug("Connected to RabbitMQ")
return conn, nil
}
logrus.Info("could not connect to RabbitMQ. Retrying in 2 seconds.")
logrus.Error("could not connect to RabbitMQ. Retrying in 2 seconds.")
time.Sleep(2 * time.Second)
}
Loading