Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Govind Balaji S committed Oct 16, 2022
1 parent ae22a0d commit 47193d3
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 key = RedisSchema.getCapacityRankingKey();
try (Jedis jedis = jedisPool.getResource()) {
return jedis.zrevrank(key, siteId.toString());
}
// 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 47193d3

Please sign in to comment.