fix
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fusenapi/constants"
|
||||
"fusenapi/server/websocket/consumer"
|
||||
"fusenapi/utils/mq_consumer_factory"
|
||||
"github.com/streadway/amqp"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"log"
|
||||
@@ -84,10 +84,10 @@ func (h *RabbitMqHandle) SendMsg(queueName constants.RABBIT_MQ, message []byte)
|
||||
}
|
||||
|
||||
// 消费消息
|
||||
func (h *RabbitMqHandle) Consume(ctx context.Context, queueName constants.RABBIT_MQ, handle consumer.MqHandle) error {
|
||||
func (h *RabbitMqHandle) Consume(ctx context.Context, queueName constants.RABBIT_MQ, handle mq_consumer_factory.MqHandle) {
|
||||
object, ok := mapMq[queueName]
|
||||
if !ok {
|
||||
return errors.New("unknown queue")
|
||||
panic("unknown queue")
|
||||
}
|
||||
go func() {
|
||||
select {
|
||||
@@ -135,5 +135,4 @@ func (h *RabbitMqHandle) Consume(ctx context.Context, queueName constants.RABBIT
|
||||
}(msg)
|
||||
}
|
||||
wait.Wait()
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user