test
This commit is contained in:
parent
8cf2b41560
commit
64f9f08666
11
workers.go
11
workers.go
@ -17,7 +17,16 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
||||
//log.Printf("MQGetMsgWorker[" + strconv.Itoa(id) + "] : Starting.")
|
||||
var x ChatWarsMessage
|
||||
for true {
|
||||
conn, err := amqp.Dial("amqp://" + cfg.Rabbit.User + ":" + cfg.Rabbit.Password + "@" + cfg.Rabbit.Host + "/" + cfg.Rabbit.Path)
|
||||
c := MQClient{
|
||||
User: cfg.Rabbit.User,
|
||||
Password: cfg.Rabbit.Password,
|
||||
Host: cfg.Rabbit.Host,
|
||||
Path: cfg.Rabbit.Path,
|
||||
SSL: false,
|
||||
}
|
||||
|
||||
conn, err := amqp.Dial("amqp://" + c.User + ":" + c.Password + "@" + c.Host + "/" + c.Path)
|
||||
|
||||
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Failed to connect to RabbitMQ")
|
||||
if err != nil {
|
||||
conn.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user