zhengtao vor 7 Monaten
Ursprung
Commit
8213dc410a
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 4 4
      game/game_cluster/nodes/db/module/actor_save_db.go

+ 4 - 4
game/game_cluster/nodes/db/module/actor_save_db.go

@@ -71,7 +71,7 @@ func (p *ActorSaves) saveAccountDB() {
 			}
 			newKey++
 		} else {
-			if key < 10000 {
+			if key < 5000 {
 				acc, _ := mdb.RDB.Get(ctx, fmt.Sprintf("%v:%v", constant.CNameAccount, k)).Bytes()
 				if len(acc) > 0 {
 					err := jsoniter.Unmarshal(acc, &account)
@@ -86,7 +86,7 @@ func (p *ActorSaves) saveAccountDB() {
 				key++
 			}
 		}
-		if newKey > 10000 || key > 10000 {
+		if newKey > 10000 || key > 5000 {
 			break
 		}
 	}
@@ -125,7 +125,7 @@ func (p *ActorSaves) savePlayerDB() {
 	newPlayers := mdb.RDB.HGetAll(ctx, constant.NewPlayers).Val()
 	updPlayer := []string{}
 	for k, _ := range newPlayers {
-		if key < 10000 {
+		if key < 5000 {
 			var player models.Player
 			acc, _ := mdb.RDB.Get(ctx, fmt.Sprintf("%v:%v", constant.CNamePlayer, k)).Bytes()
 			if len(acc) > 0 {
@@ -140,7 +140,7 @@ func (p *ActorSaves) savePlayerDB() {
 			updPlayer = append(updPlayer, player.OpenId)
 		}
 		key++
-		if key > 10000 {
+		if key > 5000 {
 			break
 		}
 	}