Browse Source

update 一个圈圈

master
dengbiao 4 months ago
parent
commit
ef235b11ca
2 changed files with 16 additions and 10 deletions
  1. +6
    -6
      consume/init.go
  2. +10
    -4
      consume/one_circles_sign_in_consume.go

+ 6
- 6
consume/init.go View File

@@ -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() {


+ 10
- 4
consume/one_circles_sign_in_consume.go View File

@@ -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"))
}


Loading…
Cancel
Save