liuyong_awesome 4 lat temu
rodzic
commit
c8fcdddafc
1 zmienionych plików z 5 dodań i 5 usunięć
  1. 5 5
      main.go

+ 5 - 5
main.go

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