Commit bf3eb818 authored by shajiaiming's avatar shajiaiming

优化

parent c02aca3f
...@@ -21,7 +21,6 @@ func init() { ...@@ -21,7 +21,6 @@ func init() {
logging.Setup() logging.Setup()
gredis.Setup() gredis.Setup()
util.Setup() util.Setup()
cron.Setup() cron.Setup()
} }
......
...@@ -5,8 +5,11 @@ import ( ...@@ -5,8 +5,11 @@ import (
"github.com/robfig/cron" "github.com/robfig/cron"
) )
func Setup(){ var c *cron.Cron
c := cron.New()
func Setup() {
c = cron.New()
c.AddFunc("* * * * * *", func() { c.AddFunc("* * * * * *", func() {
gas_service := coin_gas_service.CoinGas{} gas_service := coin_gas_service.CoinGas{}
gas_service.Etherscan() gas_service.Etherscan()
......
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