Fix OCR all files batch

This commit is contained in:
jendib 2013-08-17 16:59:16 +02:00
parent e2bd85da5f
commit 5451c79674
2 changed files with 3 additions and 4 deletions

View File

@ -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());
}
/**

View File

@ -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");