Hello,
I am trying to learn how to use the bulk framework in nuxeo based on this document https://doc.nuxeo.com/nxdoc/1010/bulk-action-framework/.
But until now I could not find how to process documents in parallel.
For example, I defined the following action (just to test) which allows to sleep one second for each document,
...
public class MyComputation extends AbstractBulkComputation {
...
@Override
protected void compute(CoreSession session, List<String> ids, Map<String, Serializable> properties) {
for (DocumentModel doc : loadDocuments(session, ids)) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
...
}
By performing this action on 10 documents, I will have a Bulkstatus with the COMPLETED state only after 10 seconds.
How can I parallelize the processing so that I will have an answer in one second in my example ?
Thanks.