From 63fe5a1881f3a46c07da54bc24bc8b7a107ccc3e Mon Sep 17 00:00:00 2001 From: dengbiao Date: Thu, 23 May 2024 15:45:42 +0800 Subject: [PATCH] update --- ...ircles_activity_coin_auto_exchange_green_energy_consume.go | 2 +- ...tivity_coin_auto_exchange_green_energy_for_team_consume.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/consume/one_circles_activity_coin_auto_exchange_green_energy_consume.go b/consume/one_circles_activity_coin_auto_exchange_green_energy_consume.go index ce774ea..4d5d4a9 100644 --- a/consume/one_circles_activity_coin_auto_exchange_green_energy_consume.go +++ b/consume/one_circles_activity_coin_auto_exchange_green_energy_consume.go @@ -32,7 +32,7 @@ func OneCirclesActivityCoinAutoExchangeGreenEnergyConsume(queue md.MqQueue) { //1、将自己绑定到交换机上 ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) //2、取出数据进行消费 - ch.Qos(20) + ch.Qos(40) delivery := ch.Consume(queue.Name, false) one_circles.Init(cfg.RedisAddr) diff --git a/consume/one_circles_activity_coin_auto_exchange_green_energy_for_team_consume.go b/consume/one_circles_activity_coin_auto_exchange_green_energy_for_team_consume.go index 6c5daa4..7301a81 100644 --- a/consume/one_circles_activity_coin_auto_exchange_green_energy_for_team_consume.go +++ b/consume/one_circles_activity_coin_auto_exchange_green_energy_for_team_consume.go @@ -32,7 +32,7 @@ func OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamConsume(queue md.MqQueu //1、将自己绑定到交换机上 ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) //2、取出数据进行消费 - ch.Qos(1) + ch.Qos(20) delivery := ch.Consume(queue.Name, false) one_circles.Init(cfg.RedisAddr) @@ -61,7 +61,7 @@ func OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamConsume(queue md.MqQueu } func handleOneCirclesActivityCoinAutoExchangeGreenEnergyForTeamConsume(msgData []byte) error { - time.Sleep(time.Duration(2) * time.Millisecond) //休眠2毫秒 + time.Sleep(time.Duration(200) * time.Microsecond) //休眠0.2毫秒 //1、解析mq中queue的数据结构体 var msg *md2.OneCirclesStructForAutoExchangeGreenEnergy err := json.Unmarshal(msgData, &msg)