This commit is contained in:
shoopea 2019-05-04 11:56:03 +08:00
parent 6545c2d1e9
commit 098f729a95
3 changed files with 2 additions and 4 deletions

View File

@ -4,7 +4,6 @@ import (
"flag"
"fmt"
"log"
"time"
"gopkg.in/gcfg.v1"

3
mq.go
View File

@ -3,11 +3,12 @@ package main
import (
"encoding/json"
"log"
"strconv"
"github.com/streadway/amqp"
)
func MQSendMsgWorker(id int, msgs chan<- ChatWarsMessage) {
func MQSendMsgWorker(id int, msgs <-chan ChatWarsMessage) {
var x ChatWarsMessage
conn, err := amqp.Dial("amqp://" + cfg.Rabbit.User + ":" + cfg.Rabbit.Password + "@" + cfg.Rabbit.Host + "/" + cfg.Rabbit.Queue)
failOnError(err, "MQSendMsgWorker["+strconv.Itoa(id)+"] : Failed to connect to RabbitMQ")

2
td.go
View File

@ -1,14 +1,12 @@
package main
import (
"encoding/json"
"fmt"
"log"
"math"
"time"
"github.com/Arman92/go-tdlib"
"github.com/streadway/amqp"
)
func ListenCW(c *tdlib.Client) {