fix
parent
c77c23c2ca
commit
596a8bf291
|
@ -843,6 +843,19 @@ public class RedisUtil {
|
|||
return -1D;
|
||||
}
|
||||
|
||||
public void updateZsetScores(String type,String key, Set<ZSetOperations.TypedTuple<String>> tuples){
|
||||
String rkey = getKey(type, key);
|
||||
for (int i = 0; i < MAX_TRY_TIMES; i++) {
|
||||
try {
|
||||
redisTemplate.opsForZSet().add(rkey,tuples);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
TimeUtils.sleep(FAILED_SLEEP);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void incrementZsetScore(String type,String key, String value, int changeScore){
|
||||
String rkey = getKey(type, key);
|
||||
for (int i = 0; i < MAX_TRY_TIMES; i++) {
|
||||
|
|
Loading…
Reference in New Issue