|
@@ -34,11 +34,7 @@ func main() {
|
|
func refreshSemCate() {
|
|
func refreshSemCate() {
|
|
redis, err := lib.GetRedisClient()
|
|
redis, err := lib.GetRedisClient()
|
|
if err != nil {
|
|
if err != nil {
|
|
- time.Sleep(10 * time.Second)
|
|
|
|
- redis, err = lib.GetNewRedisClient()
|
|
|
|
- if err != nil {
|
|
|
|
- panic(err)
|
|
|
|
- }
|
|
|
|
|
|
+ panic(err)
|
|
}
|
|
}
|
|
bids := service.Bids{}
|
|
bids := service.Bids{}
|
|
semCate, err := bids.GetSemCategory()
|
|
semCate, err := bids.GetSemCategory()
|
|
@@ -49,6 +45,8 @@ func refreshSemCate() {
|
|
redis.Set(context.Background(), "semCategoryList", val, 0)
|
|
redis.Set(context.Background(), "semCategoryList", val, 0)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ fmt.Println("refreshSemCate", err)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
func refreshSemChan() {
|
|
func refreshSemChan() {
|
|
@@ -65,5 +63,7 @@ func refreshSemChan() {
|
|
redis.Set(context.Background(), "semChanList", val, 0)
|
|
redis.Set(context.Background(), "semChanList", val, 0)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ fmt.Println("refreshSemChan", err)
|
|
}
|
|
}
|
|
}
|
|
}
|