This is an automated email from the ASF dual-hosted git repository.
olamy pushed a commit to branch use_json_jenkins_api
in repository https://gitbox.apache.org/repos/asf/maven-dist-tool.git
The following commit(s) were added to refs/heads/use_json_jenkins_api by this
push:
new 12f2082 use virtual thread
12f2082 is described below
commit 12f20822902e0a96594a769b30ec08e270f9a2b1
Author: Olivier Lamy <[email protected]>
AuthorDate: Sun Mar 15 14:49:24 2026 +1000
use virtual thread
Signed-off-by: Olivier Lamy <[email protected]>
---
.../apache/maven/dist/tools/jobs/branches/ListBranchesReport.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/src/main/java/org/apache/maven/dist/tools/jobs/branches/ListBranchesReport.java
b/src/main/java/org/apache/maven/dist/tools/jobs/branches/ListBranchesReport.java
index d8a6602..c749f4b 100644
---
a/src/main/java/org/apache/maven/dist/tools/jobs/branches/ListBranchesReport.java
+++
b/src/main/java/org/apache/maven/dist/tools/jobs/branches/ListBranchesReport.java
@@ -28,6 +28,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
+import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
@@ -44,6 +45,7 @@ import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.lib.Ref;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
import reactor.core.scheduler.Schedulers;
/**
@@ -203,8 +205,9 @@ public class ListBranchesReport extends AbstractJobsReport {
String repositoryJobUrl = MAVENBOX_JOBS_BASE_URL + repository +
"/api/json?tree=jobs[name]";
Mono<JsonNode> jenkinsMono = JsonRetry.getAsync(repositoryJobUrl);
+ Scheduler scheduler =
Schedulers.fromExecutorService(Executors.newVirtualThreadPerTaskExecutor());
Mono<Collection<String>> branchesMono =
- Mono.fromCallable(() ->
getBranches(repository)).subscribeOn(Schedulers.boundedElastic());
+ Mono.fromCallable(() ->
getBranches(repository)).subscribeOn(scheduler);
return Mono.zip(jenkinsMono, branchesMono).map(tuple -> {
JsonNode jenkinsBranchesDoc = tuple.getT1();