test
This commit is contained in:
parent
0a4125a495
commit
f80caefeea
@ -13,8 +13,8 @@ import (
|
|||||||
tb "gopkg.in/tucnak/telebot.v2"
|
tb "gopkg.in/tucnak/telebot.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Open(c *MQClient) error {
|
func OpenMQ(c *MQClient) error {
|
||||||
log.Printf("Open : Address of struct : %p\n", c)
|
log.Printf("OpenMQ : Address of struct : %p\n", c)
|
||||||
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)
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Address of struct : %p\n", c)
|
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Address of struct : %p\n", c)
|
||||||
err := Open(c)
|
err := OpenMQ(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