test
This commit is contained in:
parent
622a700178
commit
f7673e7cf1
2
mq.go
2
mq.go
@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/streadway/amqp"
|
"github.com/streadway/amqp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *MQClient) Open() error {
|
func Open(c *MQClient) error {
|
||||||
var err error
|
var err error
|
||||||
c.Connection, err = amqp.Dial("amqp://" + c.User + ":" + c.Password + "@" + c.Host + "/" + c.Path)
|
c.Connection, err = amqp.Dial("amqp://" + c.User + ":" + c.Password + "@" + c.Host + "/" + c.Path)
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
|||||||
c.Path = cfg.Rabbit.Path
|
c.Path = cfg.Rabbit.Path
|
||||||
c.SSL = false
|
c.SSL = false
|
||||||
|
|
||||||
err := c.Open()
|
err := Open(c)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
q, err := c.Channel.QueueDeclare(
|
q, err := c.Channel.QueueDeclare(
|
||||||
|
Loading…
Reference in New Issue
Block a user