mirror of
https://github.com/sismics/docs.git
synced 2024-11-24 06:37:56 +01:00
Fix OCR all files batch
This commit is contained in:
parent
e2bd85da5f
commit
5451c79674
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user