Commit 09069482 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/cron' into 'develop'

fix See merge request !26
parents bea50d5c c02aca3f
......@@ -3,10 +3,9 @@ package cron
import (
"bwallet/service/coin_gas_service"
"github.com/robfig/cron"
"time"
)
func Setup() error {
func Setup(){
c := cron.New()
c.AddFunc("* * * * * *", func() {
gas_service := coin_gas_service.CoinGas{}
......@@ -19,14 +18,4 @@ func Setup() error {
})
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