This commit is contained in:
aozhiwei 2024-06-27 16:28:00 +08:00
parent dcdccd9ac6
commit 1a68b97855
2 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
_ "main/app"
. "main/global"
_ "main/task"
_ "main/service"
)
func Init() {

View File

@ -8,6 +8,7 @@ import (
"math/big"
"mt"
"strings"
"fmt"
)
const DECIMALS = 10000
@ -59,11 +60,13 @@ func (this *bcCurrency) ExchangeUSD(amount string, itemType string, contractAddr
func (this *bcCurrency) refreshExchangeRate() () {
for true {
f5.GetSysLog().Info("bcCurrency refreshPrice1")
rspObj := []vsCurrency{}
f5.GetHttpCliMgr().SendGoStyleRequest(
jccommon.BC_CURRENCY_VS_URL,
map[string]string{},
func (rsp f5.HttpCliResponse) {
fmt.Println("bcCurrency refreshPrice22", rsp.GetErr())
if rsp.GetErr() != nil {
return
}
@ -71,6 +74,7 @@ func (this *bcCurrency) refreshExchangeRate() () {
this.updatePrice(rspObj)
}
})
f5.GetSysLog().Info("bcCurrency refreshPrice2")
if f5.IsOnlineEnv() {
time.Sleep(time.Second * 60 * 10)
} else {