Fixed - RPriorityQueue.add() method uses async method. #3864

pull/3872/head
Nikita Koksharov 3 years ago
parent 4bc53fd54d
commit 906636d1b6

@ -161,7 +161,7 @@ public class RedissonPriorityQueue<V> extends RedissonList<V> implements RPriori
index = res.getIndex() + 1;
}
commandExecutor.evalWriteAsync(getRawName(), codec, RedisCommands.EVAL_VOID,
get(commandExecutor.evalWriteAsync(getRawName(), codec, RedisCommands.EVAL_VOID,
"local len = redis.call('llen', KEYS[1]);"
+ "if tonumber(ARGV[1]) < len then "
+ "local pivot = redis.call('lindex', KEYS[1], ARGV[1]);"
@ -169,8 +169,8 @@ public class RedissonPriorityQueue<V> extends RedissonList<V> implements RPriori
+ "return;"
+ "end;"
+ "redis.call('rpush', KEYS[1], ARGV[2]);",
Arrays.<Object>asList(getRawName()),
index, encode(value));
Arrays.asList(getRawName()),
index, encode(value)));
return true;
} finally {
lock.unlock();

Loading…
Cancel
Save