This commit is contained in:
shoopea 2019-06-28 17:17:11 +08:00
parent 0a4125a495
commit f80caefeea

View File

@ -13,8 +13,8 @@ import (
tb "gopkg.in/tucnak/telebot.v2"
)
func Open(c *MQClient) error {
log.Printf("Open : Address of struct : %p\n", c)
func OpenMQ(c *MQClient) error {
log.Printf("OpenMQ : Address of struct : %p\n", c)
var err error
c.Connection, err = amqp.Dial("amqp://" + c.User + ":" + c.Password + "@" + c.Host + "/" + c.Path)
@ -46,7 +46,7 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
}
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Address of struct : %p\n", c)
err := Open(c)
err := OpenMQ(c)
if err != nil {
q, err := c.Channel.QueueDeclare(