testtest
This commit is contained in:
parent
6545c2d1e9
commit
098f729a95
1
main.go
1
main.go
@ -4,7 +4,6 @@ import (
|
|||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"time"
|
|
||||||
|
|
||||||
"gopkg.in/gcfg.v1"
|
"gopkg.in/gcfg.v1"
|
||||||
|
|
||||||
|
3
mq.go
3
mq.go
@ -3,11 +3,12 @@ package main
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"log"
|
"log"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"github.com/streadway/amqp"
|
"github.com/streadway/amqp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func MQSendMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
func MQSendMsgWorker(id int, msgs <-chan ChatWarsMessage) {
|
||||||
var x ChatWarsMessage
|
var x ChatWarsMessage
|
||||||
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.Queue)
|
||||||
failOnError(err, "MQSendMsgWorker["+strconv.Itoa(id)+"] : Failed to connect to RabbitMQ")
|
failOnError(err, "MQSendMsgWorker["+strconv.Itoa(id)+"] : Failed to connect to RabbitMQ")
|
||||||
|
2
td.go
2
td.go
@ -1,14 +1,12 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"math"
|
"math"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Arman92/go-tdlib"
|
"github.com/Arman92/go-tdlib"
|
||||||
"github.com/streadway/amqp"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func ListenCW(c *tdlib.Client) {
|
func ListenCW(c *tdlib.Client) {
|
||||||
|
Loading…
Reference in New Issue
Block a user