Roc 1 month ago
parent
commit
3a16badc4e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      services/commodity_coal_watch.go

+ 3 - 1
services/commodity_coal_watch.go

@@ -18,6 +18,9 @@ func CoalWatchTask(cont context.Context) (err error) {
 	return
 }
 
+// 煤炭市场网的文件缓存任务
+var cacheClient *cache.Cache
+
 func ReadWatchIndexFile() {
 	fmt.Println("ReadWatchIndexFile start", time.Now().Format(utils.FormatDateTime))
 	var err error
@@ -26,7 +29,6 @@ func ReadWatchIndexFile() {
 			fmt.Println("ReadWatchIndexFile Err:" + err.Error())
 		}
 	}()
-	var cacheClient *cache.Cache
 	if cacheClient == nil {
 		cacheClient = cache.New(365*24*time.Hour, 365*24*time.Hour)
 	}