Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mate0021 committed Mar 13, 2022
1 parent 4ff6726 commit d0394b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ public CapacityReport getReport(Integer limit) {
@Override
public Long getRank(Long siteId) {
// START Challenge #4
return -2L;
String capacityRankingKey = RedisSchema.getCapacityRankingKey();
try (Jedis jedis = jedisPool.getResource()) {
return jedis.zrevrank(capacityRankingKey, String.valueOf(siteId));
}
// END Challenge #4
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public void getReport() {
}

// Challenge #4
@Ignore
@Test
public void getRank() {
CapacityDao dao = new CapacityDaoRedisImpl(jedisPool);
Expand Down

0 comments on commit d0394b5

Please sign in to comment.