diff --git a/consume/init.go b/consume/init.go index 6530b49..f65fc66 100644 --- a/consume/init.go +++ b/consume/init.go @@ -80,11 +80,11 @@ func initConsumes() { //////////////////////////////////////// oneCircles ///////////////////////////////////////////////////// - //jobs[consumeMd.OneCirclesSignInGreenEnergyFunName] = OneCirclesSignInGreenEnergyConsume - //jobs[consumeMd.OneCirclesStartLevelDividendFunName] = OneCirclesStartLevelDividendConsume - //jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyConsume - //jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamConsume - //jobs[consumeMd.OneCirclesSettlementPublicGiveActivityCoinFunName] = OneCirclesSettlementPublicGiveActivityCoinConsume + jobs[consumeMd.OneCirclesSignInGreenEnergyFunName] = OneCirclesSignInGreenEnergyConsume + jobs[consumeMd.OneCirclesStartLevelDividendFunName] = OneCirclesStartLevelDividendConsume + jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyConsume + jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyForTeamConsume + jobs[consumeMd.OneCirclesSettlementPublicGiveActivityCoinFunName] = OneCirclesSettlementPublicGiveActivityCoinConsume //jobs[consumeMd.OneCirclesSignInCopyGreenEnergyFunName] = OneCirclesSignInCopyGreenEnergyConsume //////////////////////////////////////// withdraw ///////////////////////////////////////////////////// @@ -100,7 +100,7 @@ func initConsumes() { ////////////////////////////////////// SuperCloudIssuance ///////////////////////////////////////////////////// //jobs[consumeMd.SuperCloudIssuanceMsgCallBackFunName] = SuperCloudIssuanceMsgCallBackConsume - jobs[consumeMd.SuperCloudIssuanceAsyncMLoginFunName] = SuperCloudIssuanceAsyncMLoginConsume + //jobs[consumeMd.SuperCloudIssuanceAsyncMLoginFunName] = SuperCloudIssuanceAsyncMLoginConsume } func Run() { diff --git a/consume/one_circles_sign_in_consume.go b/consume/one_circles_sign_in_consume.go index 83f12ae..ec91721 100644 --- a/consume/one_circles_sign_in_consume.go +++ b/consume/one_circles_sign_in_consume.go @@ -3,6 +3,7 @@ package consume import ( "applet/app/cfg" "applet/app/db" + "applet/app/utils" "applet/app/utils/logx" "applet/consume/md" "code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit" @@ -36,11 +37,16 @@ func OneCirclesSignInGreenEnergyConsume(queue md.MqQueue) { if ok == true { err = handleOneCirclesSignInGreenEnergy(res.Body) if err != nil { - fmt.Println("OneCirclesSignInGreenEnergyConsume_ERR:::::", err.Error()) + fmt.Println("err ::: ", err) + utils.FilePutContents("OneCirclesSignInGreenEnergyConsume_ERR", "[err]:"+err.Error()) + _ = res.Reject(false) + //TODO::重新推回队列末尾,避免造成队列堵塞 + var msg *md.OneCirclesStructForSignIn + json.Unmarshal(res.Body, &msg) + ch.Publish(queue.ExchangeName, msg, queue.RoutKey) + } else { + _ = res.Ack(true) } - //_ = res.Reject(false) - err = res.Ack(true) - fmt.Println("err ::: ", err) } else { panic(errors.New("error getting message")) }