瀏覽代碼

#2640 replace with ACCESS_EXCEPTION

Shinsuke Sugaya 3 年之前
父節點
當前提交
0bc1848738

+ 1 - 1
src/main/java/org/codelibs/fess/ds/callback/FileListIndexUpdateCallbackImpl.java

@@ -161,7 +161,7 @@ public class FileListIndexUpdateCallbackImpl implements IndexUpdateCallback {
                     crawlerStatsHelper.record(keyObj, StatsAction.CHILD_URLS);
                     e.getChildUrlList().stream().map(RequestData::getUrl).forEach(urlQueue::offer);
                 } catch (final DataStoreCrawlingException e) {
-                    crawlerStatsHelper.record(keyObj, StatsAction.CRAWLING_EXCEPTION);
+                    crawlerStatsHelper.record(keyObj, StatsAction.ACCESS_EXCEPTION);
                     final Throwable cause = e.getCause();
                     if (cause instanceof ChildUrlsException) {
                         ((ChildUrlsException) cause).getChildUrlList().stream().map(RequestData::getUrl).forEach(urlQueue::offer);

+ 2 - 2
src/main/java/org/codelibs/fess/helper/CrawlerLogHelper.java

@@ -120,7 +120,7 @@ public class CrawlerLogHelper extends LogHelperImpl {
 
         super.processCrawlingAccessException(objs);
         if (objs.length > 1 && objs[1] instanceof UrlQueue<?> urlQueue) {
-            ComponentUtil.getCrawlerStatsHelper().record(urlQueue, StatsAction.CRAWLING_EXCEPTION);
+            ComponentUtil.getCrawlerStatsHelper().record(urlQueue, StatsAction.ACCESS_EXCEPTION);
         }
     }
 
@@ -149,7 +149,7 @@ public class CrawlerLogHelper extends LogHelperImpl {
 
         super.processCrawlingException(objs);
         if (objs.length > 1 && objs[1] instanceof UrlQueue<?> urlQueue) {
-            ComponentUtil.getCrawlerStatsHelper().record(urlQueue, StatsAction.CRAWLING_EXCEPTION);
+            ComponentUtil.getCrawlerStatsHelper().record(urlQueue, StatsAction.ACCESS_EXCEPTION);
         }
     }
 

+ 1 - 1
src/main/java/org/codelibs/fess/helper/CrawlerStatsHelper.java

@@ -203,9 +203,9 @@ public class CrawlerStatsHelper {
 
     public enum StatsAction {
         ACCESSED, //
+        ACCESS_EXCEPTION, //
         CHILD_URL, //
         CHILD_URLS, //
-        CRAWLING_EXCEPTION, //
         EVALUATED, //
         EXCEPTION, //
         FINISHED, //