test
This commit is contained in:
parent
4f4d10d2d7
commit
8cf2b41560
@ -14,7 +14,7 @@ database = chirpnest
|
|||||||
user = chirpnest
|
user = chirpnest
|
||||||
password = chirpnest
|
password = chirpnest
|
||||||
host = localhost:5672
|
host = localhost:5672
|
||||||
queue = chirpnest
|
path = chirpnest
|
||||||
|
|
||||||
[bot]
|
[bot]
|
||||||
admin = 0
|
admin = 0
|
||||||
|
@ -17,7 +17,7 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
|||||||
//log.Printf("MQGetMsgWorker[" + strconv.Itoa(id) + "] : Starting.")
|
//log.Printf("MQGetMsgWorker[" + strconv.Itoa(id) + "] : Starting.")
|
||||||
var x ChatWarsMessage
|
var x ChatWarsMessage
|
||||||
for true {
|
for true {
|
||||||
conn, err := amqp.Dial("amqp://" + cfg.Rabbit.User + ":" + cfg.Rabbit.Password + "@" + cfg.Rabbit.Host + "/" + cfg.Rabbit.Queue)
|
conn, err := amqp.Dial("amqp://" + cfg.Rabbit.User + ":" + cfg.Rabbit.Password + "@" + cfg.Rabbit.Host + "/" + cfg.Rabbit.Path)
|
||||||
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 {
|
||||||
conn.Close()
|
conn.Close()
|
||||||
@ -369,7 +369,7 @@ func MQTGCmdWorker(id int, cmds <-chan TGCommand) {
|
|||||||
func MQKeepAliveWorker() {
|
func MQKeepAliveWorker() {
|
||||||
//log.Printf("MQKeepAliveWorker : Starting.")
|
//log.Printf("MQKeepAliveWorker : Starting.")
|
||||||
for true {
|
for true {
|
||||||
conn, err := amqp.Dial("amqp://" + cfg.Rabbit.User + ":" + cfg.Rabbit.Password + "@" + cfg.Rabbit.Host + "/" + cfg.Rabbit.Queue)
|
conn, err := amqp.Dial("amqp://" + cfg.Rabbit.User + ":" + cfg.Rabbit.Password + "@" + cfg.Rabbit.Host + "/" + cfg.Rabbit.Path)
|
||||||
logOnError(err, "MQKeepAliveWorker : Failed to connect to RabbitMQ")
|
logOnError(err, "MQKeepAliveWorker : Failed to connect to RabbitMQ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
conn.Close()
|
conn.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user