#702 Refactor: rename CheckForAdditionalInfo to checkForAdditionalInfo

pull/717/head
yihua.huang 7 years ago
parent b0bf1a9ef2
commit c701fe8d38

@ -61,17 +61,17 @@ public class RedisScheduler extends DuplicateRemovedScheduler implements Monitor
Jedis jedis = pool.getResource(); Jedis jedis = pool.getResource();
try { try {
jedis.rpush(getQueueKey(task), request.getUrl()); jedis.rpush(getQueueKey(task), request.getUrl());
if (CheckForAdditionalInfo(request)) { if (checkForAdditionalInfo(request)) {
String field = DigestUtils.shaHex(request.getUrl()); String field = DigestUtils.shaHex(request.getUrl());
String value = JSON.toJSONString(request); String value = JSON.toJSONString(request);
jedis.hset((ITEM_PREFIX + task.getUUID()), field, value); jedis.hset((ITEM_PREFIX + task.getUUID()), field, value);
} }
} finally { } finally {
pool.returnResource(jedis); jedis.close();
} }
} }
private boolean CheckForAdditionalInfo(Request request) { private boolean checkForAdditionalInfo(Request request) {
if (request == null) { if (request == null) {
return false; return false;
} }

Loading…
Cancel
Save