@Override
    protected void pushWhenNoDuplicate(Request request, Task task) {
        Jedis jedis = pool.getResource();
        try {
            jedis.rpush(getQueueKey(task), request.getUrl());
            if (checkForAdditionalInfo(request)) {
                String field = DigestUtils.sha1Hex(request.getUrl());
                String value = JSON.toJSONString(request);
                jedis.hset((ITEM_PREFIX + task.getUUID()), field, value);
            }
        } finally {
            jedis.close();
        }
    }
Use Redis as url scheduler for distributed crawlers.<br>

@author code4crafter@gmail.com <br>
@since 0.2.0
webmagic-extension/src/main/java/us/codecraft/webmagic/scheduler/RedisScheduler.java