Commit c02aca3f authored by shajiaiming's avatar shajiaiming

fix

parent 7678c54a
...@@ -3,10 +3,9 @@ package cron ...@@ -3,10 +3,9 @@ package cron
import ( import (
"bwallet/service/coin_gas_service" "bwallet/service/coin_gas_service"
"github.com/robfig/cron" "github.com/robfig/cron"
"time"
) )
func Setup() error { func Setup(){
c := cron.New() c := cron.New()
c.AddFunc("* * * * * *", func() { c.AddFunc("* * * * * *", func() {
gas_service := coin_gas_service.CoinGas{} gas_service := coin_gas_service.CoinGas{}
...@@ -19,14 +18,4 @@ func Setup() error { ...@@ -19,14 +18,4 @@ func Setup() error {
}) })
c.Start() c.Start()
t1 := time.NewTimer(time.Second * 10)
for {
select {
case <-t1.C:
t1.Reset(time.Second * 10)
}
}
return nil
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment