test
This commit is contained in:
parent
ffff09ca65
commit
e5ce715442
6
mq.go
6
mq.go
@ -1 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
|
func (c *MQClient) Open() error {
|
||||||
|
conn, err := amqp.Dial("amqp://" + c.User + ":" + c.Password + "@" + c.Host + "/" + c.Path)
|
||||||
|
c.Connection = conn
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
@ -25,8 +25,7 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
|||||||
SSL: false,
|
SSL: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
conn, err := amqp.Dial("amqp://" + c.User + ":" + c.Password + "@" + c.Host + "/" + c.Path)
|
err := c.Open()
|
||||||
c.Connection = conn
|
|
||||||
|
|
||||||
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Failed to connect to RabbitMQ")
|
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Failed to connect to RabbitMQ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user