|
@@ -37,11 +37,11 @@ import org.codelibs.fess.es.exentity.FileConfig;
|
|
import org.codelibs.fess.es.exentity.WebConfig;
|
|
import org.codelibs.fess.es.exentity.WebConfig;
|
|
import org.codelibs.fess.indexer.IndexUpdater;
|
|
import org.codelibs.fess.indexer.IndexUpdater;
|
|
import org.codelibs.fess.util.ComponentUtil;
|
|
import org.codelibs.fess.util.ComponentUtil;
|
|
-import org.codelibs.robot.S2Robot;
|
|
|
|
-import org.codelibs.robot.S2RobotContext;
|
|
|
|
-import org.codelibs.robot.service.DataService;
|
|
|
|
-import org.codelibs.robot.service.UrlFilterService;
|
|
|
|
-import org.codelibs.robot.service.UrlQueueService;
|
|
|
|
|
|
+import org.codelibs.fess.crawler.Crawler;
|
|
|
|
+import org.codelibs.fess.crawler.CrawlerContext;
|
|
|
|
+import org.codelibs.fess.crawler.service.DataService;
|
|
|
|
+import org.codelibs.fess.crawler.service.UrlFilterService;
|
|
|
|
+import org.codelibs.fess.crawler.service.UrlQueueService;
|
|
import org.lastaflute.di.core.SingletonLaContainer;
|
|
import org.lastaflute.di.core.SingletonLaContainer;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -81,7 +81,7 @@ public class WebFsIndexHelper implements Serializable {
|
|
|
|
|
|
public int crawlerPriority = Thread.NORM_PRIORITY;
|
|
public int crawlerPriority = Thread.NORM_PRIORITY;
|
|
|
|
|
|
- private final List<S2Robot> s2RobotList = Collections.synchronizedList(new ArrayList<S2Robot>());
|
|
|
|
|
|
+ private final List<Crawler> crawlerList = Collections.synchronizedList(new ArrayList<Crawler>());
|
|
|
|
|
|
// needed?
|
|
// needed?
|
|
@Deprecated
|
|
@Deprecated
|
|
@@ -140,15 +140,15 @@ public class WebFsIndexHelper implements Serializable {
|
|
final long startTime = System.currentTimeMillis();
|
|
final long startTime = System.currentTimeMillis();
|
|
|
|
|
|
final List<String> sessionIdList = new ArrayList<String>();
|
|
final List<String> sessionIdList = new ArrayList<String>();
|
|
- s2RobotList.clear();
|
|
|
|
- final List<String> s2RobotStatusList = new ArrayList<String>();
|
|
|
|
|
|
+ crawlerList.clear();
|
|
|
|
+ final List<String> crawlerStatusList = new ArrayList<String>();
|
|
// Web
|
|
// Web
|
|
for (final WebConfig webConfig : webConfigList) {
|
|
for (final WebConfig webConfig : webConfigList) {
|
|
final String sid = crawlingConfigHelper.store(sessionId, webConfig);
|
|
final String sid = crawlingConfigHelper.store(sessionId, webConfig);
|
|
|
|
|
|
- // create s2robot
|
|
|
|
- final S2Robot s2Robot = SingletonLaContainer.getComponent(S2Robot.class);
|
|
|
|
- s2Robot.setSessionId(sid);
|
|
|
|
|
|
+ // create crawler
|
|
|
|
+ final Crawler crawler = SingletonLaContainer.getComponent(Crawler.class);
|
|
|
|
+ crawler.setSessionId(sid);
|
|
sessionIdList.add(sid);
|
|
sessionIdList.add(sid);
|
|
|
|
|
|
final String urlsStr = webConfig.getUrls();
|
|
final String urlsStr = webConfig.getUrls();
|
|
@@ -160,26 +160,26 @@ public class WebFsIndexHelper implements Serializable {
|
|
// interval time
|
|
// interval time
|
|
final int intervalTime =
|
|
final int intervalTime =
|
|
webConfig.getIntervalTime() != null ? webConfig.getIntervalTime() : Constants.DEFAULT_INTERVAL_TIME_FOR_WEB;
|
|
webConfig.getIntervalTime() != null ? webConfig.getIntervalTime() : Constants.DEFAULT_INTERVAL_TIME_FOR_WEB;
|
|
- ((FessIntervalController) s2Robot.getIntervalController()).setDelayMillisForWaitingNewUrl(intervalTime);
|
|
|
|
|
|
+ ((FessIntervalController) crawler.getIntervalController()).setDelayMillisForWaitingNewUrl(intervalTime);
|
|
|
|
|
|
final String includedUrlsStr = webConfig.getIncludedUrls() != null ? webConfig.getIncludedUrls() : StringUtil.EMPTY;
|
|
final String includedUrlsStr = webConfig.getIncludedUrls() != null ? webConfig.getIncludedUrls() : StringUtil.EMPTY;
|
|
final String excludedUrlsStr = webConfig.getExcludedUrls() != null ? webConfig.getExcludedUrls() : StringUtil.EMPTY;
|
|
final String excludedUrlsStr = webConfig.getExcludedUrls() != null ? webConfig.getExcludedUrls() : StringUtil.EMPTY;
|
|
|
|
|
|
// num of threads
|
|
// num of threads
|
|
- final S2RobotContext robotContext = s2Robot.getRobotContext();
|
|
|
|
|
|
+ final CrawlerContext crawlerContext = crawler.getCrawlerContext();
|
|
final int numOfThread =
|
|
final int numOfThread =
|
|
webConfig.getNumOfThread() != null ? webConfig.getNumOfThread() : Constants.DEFAULT_NUM_OF_THREAD_FOR_WEB;
|
|
webConfig.getNumOfThread() != null ? webConfig.getNumOfThread() : Constants.DEFAULT_NUM_OF_THREAD_FOR_WEB;
|
|
- robotContext.setNumOfThread(numOfThread);
|
|
|
|
|
|
+ crawlerContext.setNumOfThread(numOfThread);
|
|
|
|
|
|
// depth
|
|
// depth
|
|
final int depth = webConfig.getDepth() != null ? webConfig.getDepth() : -1;
|
|
final int depth = webConfig.getDepth() != null ? webConfig.getDepth() : -1;
|
|
- robotContext.setMaxDepth(depth);
|
|
|
|
|
|
+ crawlerContext.setMaxDepth(depth);
|
|
|
|
|
|
// max count
|
|
// max count
|
|
final long maxCount = webConfig.getMaxAccessCount() != null ? webConfig.getMaxAccessCount() : maxAccessCount;
|
|
final long maxCount = webConfig.getMaxAccessCount() != null ? webConfig.getMaxAccessCount() : maxAccessCount;
|
|
- robotContext.setMaxAccessCount(maxCount);
|
|
|
|
|
|
+ crawlerContext.setMaxAccessCount(maxCount);
|
|
|
|
|
|
- webConfig.initializeClientFactory(s2Robot.getClientFactory());
|
|
|
|
|
|
+ webConfig.initializeClientFactory(crawler.getClientFactory());
|
|
|
|
|
|
// set urls
|
|
// set urls
|
|
final String[] urls = urlsStr.split("[\r\n]");
|
|
final String[] urls = urlsStr.split("[\r\n]");
|
|
@@ -187,7 +187,7 @@ public class WebFsIndexHelper implements Serializable {
|
|
if (StringUtil.isNotBlank(u)) {
|
|
if (StringUtil.isNotBlank(u)) {
|
|
final String urlValue = u.trim();
|
|
final String urlValue = u.trim();
|
|
if (!urlValue.startsWith("#")) {
|
|
if (!urlValue.startsWith("#")) {
|
|
- s2Robot.addUrl(urlValue);
|
|
|
|
|
|
+ crawler.addUrl(urlValue);
|
|
if (logger.isInfoEnabled()) {
|
|
if (logger.isInfoEnabled()) {
|
|
logger.info("Target URL: " + urlValue);
|
|
logger.info("Target URL: " + urlValue);
|
|
}
|
|
}
|
|
@@ -201,7 +201,7 @@ public class WebFsIndexHelper implements Serializable {
|
|
if (StringUtil.isNotBlank(u)) {
|
|
if (StringUtil.isNotBlank(u)) {
|
|
final String urlValue = u.trim();
|
|
final String urlValue = u.trim();
|
|
if (!urlValue.startsWith("#")) {
|
|
if (!urlValue.startsWith("#")) {
|
|
- s2Robot.addIncludeFilter(urlValue);
|
|
|
|
|
|
+ crawler.addIncludeFilter(urlValue);
|
|
if (logger.isInfoEnabled()) {
|
|
if (logger.isInfoEnabled()) {
|
|
logger.info("Included URL: " + urlValue);
|
|
logger.info("Included URL: " + urlValue);
|
|
}
|
|
}
|
|
@@ -215,7 +215,7 @@ public class WebFsIndexHelper implements Serializable {
|
|
if (StringUtil.isNotBlank(u)) {
|
|
if (StringUtil.isNotBlank(u)) {
|
|
final String urlValue = u.trim();
|
|
final String urlValue = u.trim();
|
|
if (!urlValue.startsWith("#")) {
|
|
if (!urlValue.startsWith("#")) {
|
|
- s2Robot.addExcludeFilter(urlValue);
|
|
|
|
|
|
+ crawler.addExcludeFilter(urlValue);
|
|
if (logger.isInfoEnabled()) {
|
|
if (logger.isInfoEnabled()) {
|
|
logger.info("Excluded URL: " + urlValue);
|
|
logger.info("Excluded URL: " + urlValue);
|
|
}
|
|
}
|
|
@@ -229,7 +229,7 @@ public class WebFsIndexHelper implements Serializable {
|
|
for (final String u : excludedUrlList) {
|
|
for (final String u : excludedUrlList) {
|
|
if (StringUtil.isNotBlank(u)) {
|
|
if (StringUtil.isNotBlank(u)) {
|
|
final String urlValue = u.trim();
|
|
final String urlValue = u.trim();
|
|
- s2Robot.addExcludeFilter(urlValue);
|
|
|
|
|
|
+ crawler.addExcludeFilter(urlValue);
|
|
if (logger.isInfoEnabled()) {
|
|
if (logger.isInfoEnabled()) {
|
|
logger.info("Excluded URL from failures: " + urlValue);
|
|
logger.info("Excluded URL from failures: " + urlValue);
|
|
}
|
|
}
|
|
@@ -241,20 +241,20 @@ public class WebFsIndexHelper implements Serializable {
|
|
logger.debug("Crawling " + urlsStr);
|
|
logger.debug("Crawling " + urlsStr);
|
|
}
|
|
}
|
|
|
|
|
|
- s2Robot.setBackground(true);
|
|
|
|
- s2Robot.setThreadPriority(crawlerPriority);
|
|
|
|
|
|
+ crawler.setBackground(true);
|
|
|
|
+ crawler.setThreadPriority(crawlerPriority);
|
|
|
|
|
|
- s2RobotList.add(s2Robot);
|
|
|
|
- s2RobotStatusList.add(Constants.READY);
|
|
|
|
|
|
+ crawlerList.add(crawler);
|
|
|
|
+ crawlerStatusList.add(Constants.READY);
|
|
}
|
|
}
|
|
|
|
|
|
// File
|
|
// File
|
|
for (final FileConfig fileConfig : fileConfigList) {
|
|
for (final FileConfig fileConfig : fileConfigList) {
|
|
final String sid = crawlingConfigHelper.store(sessionId, fileConfig);
|
|
final String sid = crawlingConfigHelper.store(sessionId, fileConfig);
|
|
|
|
|
|
- // create s2robot
|
|
|
|
- final S2Robot s2Robot = SingletonLaContainer.getComponent(S2Robot.class);
|
|
|
|
- s2Robot.setSessionId(sid);
|
|
|
|
|
|
+ // create crawler
|
|
|
|
+ final Crawler crawler = SingletonLaContainer.getComponent(Crawler.class);
|
|
|
|
+ crawler.setSessionId(sid);
|
|
sessionIdList.add(sid);
|
|
sessionIdList.add(sid);
|
|
|
|
|
|
final String pathsStr = fileConfig.getPaths();
|
|
final String pathsStr = fileConfig.getPaths();
|
|
@@ -265,26 +265,26 @@ public class WebFsIndexHelper implements Serializable {
|
|
|
|
|
|
final int intervalTime =
|
|
final int intervalTime =
|
|
fileConfig.getIntervalTime() != null ? fileConfig.getIntervalTime() : Constants.DEFAULT_INTERVAL_TIME_FOR_FS;
|
|
fileConfig.getIntervalTime() != null ? fileConfig.getIntervalTime() : Constants.DEFAULT_INTERVAL_TIME_FOR_FS;
|
|
- ((FessIntervalController) s2Robot.getIntervalController()).setDelayMillisForWaitingNewUrl(intervalTime);
|
|
|
|
|
|
+ ((FessIntervalController) crawler.getIntervalController()).setDelayMillisForWaitingNewUrl(intervalTime);
|
|
|
|
|
|
final String includedPathsStr = fileConfig.getIncludedPaths() != null ? fileConfig.getIncludedPaths() : StringUtil.EMPTY;
|
|
final String includedPathsStr = fileConfig.getIncludedPaths() != null ? fileConfig.getIncludedPaths() : StringUtil.EMPTY;
|
|
final String excludedPathsStr = fileConfig.getExcludedPaths() != null ? fileConfig.getExcludedPaths() : StringUtil.EMPTY;
|
|
final String excludedPathsStr = fileConfig.getExcludedPaths() != null ? fileConfig.getExcludedPaths() : StringUtil.EMPTY;
|
|
|
|
|
|
// num of threads
|
|
// num of threads
|
|
- final S2RobotContext robotContext = s2Robot.getRobotContext();
|
|
|
|
|
|
+ final CrawlerContext crawlerContext = crawler.getCrawlerContext();
|
|
final int numOfThread =
|
|
final int numOfThread =
|
|
fileConfig.getNumOfThread() != null ? fileConfig.getNumOfThread() : Constants.DEFAULT_NUM_OF_THREAD_FOR_FS;
|
|
fileConfig.getNumOfThread() != null ? fileConfig.getNumOfThread() : Constants.DEFAULT_NUM_OF_THREAD_FOR_FS;
|
|
- robotContext.setNumOfThread(numOfThread);
|
|
|
|
|
|
+ crawlerContext.setNumOfThread(numOfThread);
|
|
|
|
|
|
// depth
|
|
// depth
|
|
final int depth = fileConfig.getDepth() != null ? fileConfig.getDepth() : -1;
|
|
final int depth = fileConfig.getDepth() != null ? fileConfig.getDepth() : -1;
|
|
- robotContext.setMaxDepth(depth);
|
|
|
|
|
|
+ crawlerContext.setMaxDepth(depth);
|
|
|
|
|
|
// max count
|
|
// max count
|
|
final long maxCount = fileConfig.getMaxAccessCount() != null ? fileConfig.getMaxAccessCount() : maxAccessCount;
|
|
final long maxCount = fileConfig.getMaxAccessCount() != null ? fileConfig.getMaxAccessCount() : maxAccessCount;
|
|
- robotContext.setMaxAccessCount(maxCount);
|
|
|
|
|
|
+ crawlerContext.setMaxAccessCount(maxCount);
|
|
|
|
|
|
- fileConfig.initializeClientFactory(s2Robot.getClientFactory());
|
|
|
|
|
|
+ fileConfig.initializeClientFactory(crawler.getClientFactory());
|
|
|
|
|
|
// set paths
|
|
// set paths
|
|
final String[] paths = pathsStr.split("[\r\n]");
|
|
final String[] paths = pathsStr.split("[\r\n]");
|
|
@@ -299,7 +299,7 @@ public class WebFsIndexHelper implements Serializable {
|
|
u = "file:/" + u;
|
|
u = "file:/" + u;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- s2Robot.addUrl(u);
|
|
|
|
|
|
+ crawler.addUrl(u);
|
|
if (logger.isInfoEnabled()) {
|
|
if (logger.isInfoEnabled()) {
|
|
logger.info("Target Path: " + u);
|
|
logger.info("Target Path: " + u);
|
|
}
|
|
}
|
|
@@ -321,7 +321,7 @@ public class WebFsIndexHelper implements Serializable {
|
|
} else {
|
|
} else {
|
|
urlValue = systemHelper.encodeUrlFilter(line);
|
|
urlValue = systemHelper.encodeUrlFilter(line);
|
|
}
|
|
}
|
|
- s2Robot.addIncludeFilter(urlValue);
|
|
|
|
|
|
+ crawler.addIncludeFilter(urlValue);
|
|
if (logger.isInfoEnabled()) {
|
|
if (logger.isInfoEnabled()) {
|
|
logger.info("Included Path: " + urlValue);
|
|
logger.info("Included Path: " + urlValue);
|
|
}
|
|
}
|
|
@@ -345,7 +345,7 @@ public class WebFsIndexHelper implements Serializable {
|
|
} else {
|
|
} else {
|
|
urlValue = systemHelper.encodeUrlFilter(line);
|
|
urlValue = systemHelper.encodeUrlFilter(line);
|
|
}
|
|
}
|
|
- s2Robot.addExcludeFilter(urlValue);
|
|
|
|
|
|
+ crawler.addExcludeFilter(urlValue);
|
|
if (logger.isInfoEnabled()) {
|
|
if (logger.isInfoEnabled()) {
|
|
logger.info("Excluded Path: " + urlValue);
|
|
logger.info("Excluded Path: " + urlValue);
|
|
}
|
|
}
|
|
@@ -361,7 +361,7 @@ public class WebFsIndexHelper implements Serializable {
|
|
for (final String u : excludedUrlList) {
|
|
for (final String u : excludedUrlList) {
|
|
if (StringUtil.isNotBlank(u)) {
|
|
if (StringUtil.isNotBlank(u)) {
|
|
final String urlValue = u.trim();
|
|
final String urlValue = u.trim();
|
|
- s2Robot.addExcludeFilter(urlValue);
|
|
|
|
|
|
+ crawler.addExcludeFilter(urlValue);
|
|
if (logger.isInfoEnabled()) {
|
|
if (logger.isInfoEnabled()) {
|
|
logger.info("Excluded Path from failures: " + urlValue);
|
|
logger.info("Excluded Path from failures: " + urlValue);
|
|
}
|
|
}
|
|
@@ -373,11 +373,11 @@ public class WebFsIndexHelper implements Serializable {
|
|
logger.debug("Crawling " + pathsStr);
|
|
logger.debug("Crawling " + pathsStr);
|
|
}
|
|
}
|
|
|
|
|
|
- s2Robot.setBackground(true);
|
|
|
|
- s2Robot.setThreadPriority(crawlerPriority);
|
|
|
|
|
|
+ crawler.setBackground(true);
|
|
|
|
+ crawler.setThreadPriority(crawlerPriority);
|
|
|
|
|
|
- s2RobotList.add(s2Robot);
|
|
|
|
- s2RobotStatusList.add(Constants.READY);
|
|
|
|
|
|
+ crawlerList.add(crawler);
|
|
|
|
+ crawlerStatusList.add(Constants.READY);
|
|
}
|
|
}
|
|
|
|
|
|
// run index update
|
|
// run index update
|
|
@@ -386,7 +386,7 @@ public class WebFsIndexHelper implements Serializable {
|
|
indexUpdater.setPriority(indexUpdaterPriority);
|
|
indexUpdater.setPriority(indexUpdaterPriority);
|
|
indexUpdater.setSessionIdList(sessionIdList);
|
|
indexUpdater.setSessionIdList(sessionIdList);
|
|
indexUpdater.setDaemon(true);
|
|
indexUpdater.setDaemon(true);
|
|
- indexUpdater.setS2RobotList(s2RobotList);
|
|
|
|
|
|
+ indexUpdater.setCrawlerList(crawlerList);
|
|
for (final BoostDocumentRule rule : boostDocumentRuleService.getAvailableBoostDocumentRuleList()) {
|
|
for (final BoostDocumentRule rule : boostDocumentRuleService.getAvailableBoostDocumentRuleList()) {
|
|
indexUpdater.addBoostDocumentRule(new org.codelibs.fess.indexer.BoostDocumentRule(rule));
|
|
indexUpdater.addBoostDocumentRule(new org.codelibs.fess.indexer.BoostDocumentRule(rule));
|
|
}
|
|
}
|
|
@@ -394,19 +394,19 @@ public class WebFsIndexHelper implements Serializable {
|
|
|
|
|
|
int startedCrawlerNum = 0;
|
|
int startedCrawlerNum = 0;
|
|
int activeCrawlerNum = 0;
|
|
int activeCrawlerNum = 0;
|
|
- while (startedCrawlerNum < s2RobotList.size()) {
|
|
|
|
|
|
+ while (startedCrawlerNum < crawlerList.size()) {
|
|
// Force to stop crawl
|
|
// Force to stop crawl
|
|
if (systemHelper.isForceStop()) {
|
|
if (systemHelper.isForceStop()) {
|
|
- for (final S2Robot s2Robot : s2RobotList) {
|
|
|
|
- s2Robot.stop();
|
|
|
|
|
|
+ for (final Crawler crawler : crawlerList) {
|
|
|
|
+ crawler.stop();
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
if (activeCrawlerNum < multiprocessCrawlingCount) {
|
|
if (activeCrawlerNum < multiprocessCrawlingCount) {
|
|
// start crawling
|
|
// start crawling
|
|
- s2RobotList.get(startedCrawlerNum).execute();
|
|
|
|
- s2RobotStatusList.set(startedCrawlerNum, Constants.RUNNING);
|
|
|
|
|
|
+ crawlerList.get(startedCrawlerNum).execute();
|
|
|
|
+ crawlerStatusList.set(startedCrawlerNum, Constants.RUNNING);
|
|
startedCrawlerNum++;
|
|
startedCrawlerNum++;
|
|
activeCrawlerNum++;
|
|
activeCrawlerNum++;
|
|
try {
|
|
try {
|
|
@@ -419,10 +419,10 @@ public class WebFsIndexHelper implements Serializable {
|
|
|
|
|
|
// check status
|
|
// check status
|
|
for (int i = 0; i < startedCrawlerNum; i++) {
|
|
for (int i = 0; i < startedCrawlerNum; i++) {
|
|
- if (!s2RobotList.get(i).getRobotContext().isRunning() && s2RobotStatusList.get(i).equals(Constants.RUNNING)) {
|
|
|
|
- s2RobotList.get(i).awaitTermination();
|
|
|
|
- s2RobotStatusList.set(i, Constants.DONE);
|
|
|
|
- final String sid = s2RobotList.get(i).getRobotContext().getSessionId();
|
|
|
|
|
|
+ if (!crawlerList.get(i).getCrawlerContext().isRunning() && crawlerStatusList.get(i).equals(Constants.RUNNING)) {
|
|
|
|
+ crawlerList.get(i).awaitTermination();
|
|
|
|
+ crawlerStatusList.set(i, Constants.DONE);
|
|
|
|
+ final String sid = crawlerList.get(i).getCrawlerContext().getSessionId();
|
|
indexUpdater.addFinishedSessionId(sid);
|
|
indexUpdater.addFinishedSessionId(sid);
|
|
activeCrawlerNum--;
|
|
activeCrawlerNum--;
|
|
}
|
|
}
|
|
@@ -437,20 +437,20 @@ public class WebFsIndexHelper implements Serializable {
|
|
boolean finishedAll = false;
|
|
boolean finishedAll = false;
|
|
while (!finishedAll) {
|
|
while (!finishedAll) {
|
|
finishedAll = true;
|
|
finishedAll = true;
|
|
- for (int i = 0; i < s2RobotList.size(); i++) {
|
|
|
|
- s2RobotList.get(i).awaitTermination(crawlingExecutionInterval);
|
|
|
|
- if (!s2RobotList.get(i).getRobotContext().isRunning() && !s2RobotStatusList.get(i).equals(Constants.DONE)) {
|
|
|
|
- s2RobotStatusList.set(i, Constants.DONE);
|
|
|
|
- final String sid = s2RobotList.get(i).getRobotContext().getSessionId();
|
|
|
|
|
|
+ for (int i = 0; i < crawlerList.size(); i++) {
|
|
|
|
+ crawlerList.get(i).awaitTermination(crawlingExecutionInterval);
|
|
|
|
+ if (!crawlerList.get(i).getCrawlerContext().isRunning() && !crawlerStatusList.get(i).equals(Constants.DONE)) {
|
|
|
|
+ crawlerStatusList.set(i, Constants.DONE);
|
|
|
|
+ final String sid = crawlerList.get(i).getCrawlerContext().getSessionId();
|
|
indexUpdater.addFinishedSessionId(sid);
|
|
indexUpdater.addFinishedSessionId(sid);
|
|
}
|
|
}
|
|
- if (!s2RobotStatusList.get(i).equals(Constants.DONE)) {
|
|
|
|
|
|
+ if (!crawlerStatusList.get(i).equals(Constants.DONE)) {
|
|
finishedAll = false;
|
|
finishedAll = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- s2RobotList.clear();
|
|
|
|
- s2RobotStatusList.clear();
|
|
|
|
|
|
+ crawlerList.clear();
|
|
|
|
+ crawlerStatusList.clear();
|
|
|
|
|
|
// put cralwing info
|
|
// put cralwing info
|
|
final CrawlingSessionHelper crawlingSessionHelper = ComponentUtil.getCrawlingSessionHelper();
|
|
final CrawlingSessionHelper crawlingSessionHelper = ComponentUtil.getCrawlingSessionHelper();
|