1
This commit is contained in:
parent
dcdccd9ac6
commit
1a68b97855
@ -4,6 +4,7 @@ import (
|
||||
_ "main/app"
|
||||
. "main/global"
|
||||
_ "main/task"
|
||||
_ "main/service"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user