|
|
@ -48,7 +48,7 @@ public class RedisScheduler extends DuplicateRemovedScheduler implements Monitor
|
|
|
|
public boolean isDuplicate(Request request, Task task) {
|
|
|
|
public boolean isDuplicate(Request request, Task task) {
|
|
|
|
Jedis jedis = pool.getResource();
|
|
|
|
Jedis jedis = pool.getResource();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
return jedis.sadd(getSetKey(task), request.getUrl()) > 0;
|
|
|
|
return jedis.sadd(getSetKey(task), request.getUrl()) == 0;
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
pool.returnResource(jedis);
|
|
|
|
pool.returnResource(jedis);
|
|
|
|
}
|
|
|
|
}
|
|
|
|