Skip to content

Commit

Permalink
[core] Dispatch batch-unindex tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Enet4 committed Apr 17, 2024
1 parent 1b99804 commit 70ce1b0
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,16 @@ public Task<UnindexReport> unindex(String indexProvider, Collection<URI> items,
if (indexer == null) {
indexer = this.getIndexingPlugins(true).iterator().next();
}
return indexer.unindex(items, progressCallback);
Task<UnindexReport> task = indexer.unindex(items, progressCallback);
if (task != null) {
final String taskUniqueID = UUID.randomUUID().toString();
task.setName(String.format("[%s]unindex", indexer.getName()));
task.onCompletion(() -> {
logger.info("Unindexing task [{}] complete", taskUniqueID);
});
taskManager.dispatch(task);
}
return task;
}

/** Issue an unindexing procedure to the given indexers.
Expand Down

0 comments on commit 70ce1b0

Please sign in to comment.