jkevan commented on code in PR #636: URL: https://github.com/apache/unomi/pull/636#discussion_r1275174104
########## persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java: ########## @@ -1158,6 +1157,45 @@ protected Boolean execute(Object... args) throws Exception { } } + private void startTaskTracker(AbstractBulkByScrollRequest request, TaskSubmissionResponse response) { + logger.info("Start tracking submitted task: [{}]. See debug log level for more information", response.getTask()); + if (logger.isDebugEnabled()) { + logger.debug("Tracking task [{}]: [{}] using query: [{}]", response.getTask(), request.toString(), request.getSearchRequest().source().query()); + } + new InClassLoaderExecute<Void>(metricsService, this.getClass().getName() + ".taskTracker", this.bundleContext, this.fatalIllegalStateErrors, throwExceptions) { + protected Void execute(Object... args) throws Exception { + + TaskId taskId = new TaskId(response.getTask()); + while (true){ Review Comment: Yes sounds reasonable to add a protection with a timeout. I added some configuration too, to be able to set both the polling and the timeout if necessary. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@unomi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org