From 68f4760d07dc91cb8114b8ecb84021d9af549910 Mon Sep 17 00:00:00 2001 From: Koda Date: Wed, 14 Sep 2016 04:10:47 +0900 Subject: [PATCH] Items that crawl fails to exempt from the next time --- .../org/support/project/knowledge/bat/FileParseBat.java | 4 ++++ .../project/knowledge/entity/KnowledgeItemValuesEntity.java | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/support/project/knowledge/bat/FileParseBat.java b/src/main/java/org/support/project/knowledge/bat/FileParseBat.java index ebf14b2c9..ef9342718 100644 --- a/src/main/java/org/support/project/knowledge/bat/FileParseBat.java +++ b/src/main/java/org/support/project/knowledge/bat/FileParseBat.java @@ -103,6 +103,10 @@ private void crawl() throws Exception { if (knowledgesEntity == null) { continue; } + // パースステータスを処理中に変更 + itemValue.setItemStatus(KnowledgeItemValuesEntity.STATUS_DO_PROCESS); + itemValuesDao.update(itemValue); + // タグを取得 List tagsEntities = TagsDao.get().selectOnKnowledgeId(knowledgesEntity.getKnowledgeId()); // Webアクセス diff --git a/src/main/java/org/support/project/knowledge/entity/KnowledgeItemValuesEntity.java b/src/main/java/org/support/project/knowledge/entity/KnowledgeItemValuesEntity.java index 1a9fd160c..b2c340c39 100644 --- a/src/main/java/org/support/project/knowledge/entity/KnowledgeItemValuesEntity.java +++ b/src/main/java/org/support/project/knowledge/entity/KnowledgeItemValuesEntity.java @@ -15,9 +15,11 @@ public class KnowledgeItemValuesEntity extends GenKnowledgeItemValuesEntity { private static final long serialVersionUID = 1L; /** ステータス: 保存済み */ public static final Integer STATUS_SAVED = 0; + /** ステータス: 処理中 */ + public static final Integer STATUS_DO_PROCESS = 1; /** ステータス: Webの値取得済み */ - public static final Integer STATUS_WEBACCESSED = 1; - /** ステータス: Webの値取得済み */ + public static final Integer STATUS_WEBACCESSED = 10; + /** ステータス: エラー */ public static final Integer STATUS_WEBACCESS_ERROR = -1; /**