Skip to content

Commit 3b1d946

Browse files
Vladimir Kotalahornace
authored andcommitted
another suggester.rebuild() to become async
1 parent 5772f2d commit 3b1d946

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

opengrok-web/src/main/java/org/opengrok/web/api/v1/controller/SystemController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import javax.ws.rs.core.MediaType;
3535
import java.io.IOException;
3636
import java.util.Collections;
37+
import java.util.concurrent.CompletableFuture;
3738

3839
@Path("/system")
3940
public class SystemController {
@@ -48,7 +49,7 @@ public class SystemController {
4849
@Consumes(MediaType.TEXT_PLAIN)
4950
public void refresh(final String project) {
5051
env.maybeRefreshIndexSearchers(Collections.singleton(project));
51-
suggester.rebuild(project);
52+
CompletableFuture.runAsync(() -> suggester.rebuild(project));
5253
}
5354

5455
@PUT

0 commit comments

Comments
 (0)