From 5451c7967451aa527d1b1107c1f592b187ca8bcd Mon Sep 17 00:00:00 2001 From: jendib Date: Sat, 17 Aug 2013 16:59:16 +0200 Subject: [PATCH] Fix OCR all files batch --- .../java/com/sismics/docs/core/model/context/AppContext.java | 4 ++-- .../main/java/com/sismics/docs/rest/resource/AppResource.java | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java b/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java index 5350a2a9..24b842fd 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java @@ -13,12 +13,12 @@ import com.google.common.eventbus.AsyncEventBus; import com.google.common.eventbus.EventBus; import com.sismics.docs.core.constant.ConfigType; import com.sismics.docs.core.dao.jpa.ConfigDao; -import com.sismics.docs.core.event.OcrFileAsyncEvent; import com.sismics.docs.core.listener.async.DocumentCreatedAsyncListener; import com.sismics.docs.core.listener.async.DocumentDeletedAsyncListener; import com.sismics.docs.core.listener.async.DocumentUpdatedAsyncListener; import com.sismics.docs.core.listener.async.FileCreatedAsyncListener; import com.sismics.docs.core.listener.async.FileDeletedAsyncListener; +import com.sismics.docs.core.listener.async.OcrFileAsyncListener; import com.sismics.docs.core.listener.async.RebuildIndexAsyncListener; import com.sismics.docs.core.listener.sync.DeadEventListener; import com.sismics.docs.core.model.jpa.Config; @@ -91,7 +91,7 @@ public class AppContext { asyncEventBus.register(new DocumentUpdatedAsyncListener()); asyncEventBus.register(new DocumentDeletedAsyncListener()); asyncEventBus.register(new RebuildIndexAsyncListener()); - asyncEventBus.register(new OcrFileAsyncEvent()); + asyncEventBus.register(new OcrFileAsyncListener()); } /** diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java index 05749db2..655fbdbe 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java @@ -155,8 +155,7 @@ public class AppResource extends BaseResource { checkBaseFunction(BaseFunction.ADMIN); // Raise a OCR file event - OcrFileAsyncEvent ocrFileAsyncEvent = new OcrFileAsyncEvent(); - AppContext.getInstance().getAsyncEventBus().post(ocrFileAsyncEvent); + AppContext.getInstance().getAsyncEventBus().post(new OcrFileAsyncEvent()); JSONObject response = new JSONObject(); response.put("status", "ok");