fix
This commit is contained in:
parent
5a713d4d9d
commit
c7f3ca5ab4
|
@ -9,9 +9,3 @@ const (
|
|||
//渲染结果数据队列
|
||||
RABBIT_MQ_RENDER_RESULT_DATA RABBIT_MQ = "RABBIT_MQ_RENDER_RESULT_DATA"
|
||||
)
|
||||
|
||||
// 队列列表
|
||||
var MQ_QUEUE_ARR = []RABBIT_MQ{
|
||||
RABBIT_MQ_ASSEMBLE_RENDER_DATA,
|
||||
RABBIT_MQ_RENDER_RESULT_DATA,
|
||||
}
|
||||
|
|
|
@ -18,6 +18,12 @@ type queueItem struct {
|
|||
queue amqp.Queue
|
||||
}
|
||||
|
||||
// 队列列表
|
||||
var mqQueueArr = []constants.RABBIT_MQ{
|
||||
constants.RABBIT_MQ_ASSEMBLE_RENDER_DATA,
|
||||
constants.RABBIT_MQ_RENDER_RESULT_DATA,
|
||||
}
|
||||
|
||||
// 存储连接
|
||||
var mapMq = make(map[constants.RABBIT_MQ]queueItem)
|
||||
|
||||
|
@ -35,7 +41,7 @@ func InitRabbitMq(url string, config *tls.Config) *RabbitMqHandle {
|
|||
log.Fatalf("Failed to open a channel: %v", err)
|
||||
}
|
||||
//声明队列
|
||||
for _, queueName := range constants.MQ_QUEUE_ARR {
|
||||
for _, queueName := range mqQueueArr {
|
||||
q, err := ch.QueueDeclare(
|
||||
string(queueName), // 队列名
|
||||
true, // 是否持久化
|
||||
|
|
Loading…
Reference in New Issue
Block a user