瀏覽代碼

update 一个圈圈

master
dengbiao 4 月之前
父節點
當前提交
ef235b11ca
共有 2 個文件被更改,包括 16 次插入10 次删除
  1. +6
    -6
      consume/init.go
  2. +10
    -4
      consume/one_circles_sign_in_consume.go

+ 6
- 6
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() {


+ 10
- 4
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"))
}


Loading…
取消
儲存