Ver código fonte

fix bug in lpop

tags/2.0.1
Jonathan Cobb 4 anos atrás
pai
commit
3d61df204d
1 arquivos alterados com 3 adições e 3 exclusões
  1. +3
    -3
      wizard-server/src/main/java/org/cobbzilla/wizard/cache/redis/RedisService.java

+ 3
- 3
wizard-server/src/main/java/org/cobbzilla/wizard/cache/redis/RedisService.java Ver arquivo

@@ -383,15 +383,15 @@ public class RedisService {
}
}

private String __lpop(String data, int attempt, int maxRetries) {
private String __lpop(String key, int attempt, int maxRetries) {
try {
synchronized (redis) {
return getRedis().lpop(data);
return getRedis().lpop(prefix(key));
}
} catch (RuntimeException e) {
if (attempt > maxRetries) throw e;
resetForRetry(attempt, "retrying RedisService.__lpop");
return __lpop(data, attempt+1, maxRetries);
return __lpop(key, attempt+1, maxRetries);
}
}



Carregando…
Cancelar
Salvar