From ed57ce288dc492395e9ac05b594e6ed46769632a Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Thu, 25 Apr 2024 11:20:42 +0200 Subject: [PATCH] Use IO executor consistently (#471) Signed-off-by: Paolo Di Tommaso --- .../groovy/io/seqera/wave/controller/MetricsController.groovy | 3 +++ .../groovy/io/seqera/wave/controller/ValidateController.groovy | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/groovy/io/seqera/wave/controller/MetricsController.groovy b/src/main/groovy/io/seqera/wave/controller/MetricsController.groovy index aece5dff9..0ad18d308 100644 --- a/src/main/groovy/io/seqera/wave/controller/MetricsController.groovy +++ b/src/main/groovy/io/seqera/wave/controller/MetricsController.groovy @@ -29,6 +29,8 @@ import io.micronaut.http.annotation.Controller import io.micronaut.http.annotation.Error import io.micronaut.http.annotation.Get import io.micronaut.http.annotation.QueryValue +import io.micronaut.scheduling.TaskExecutors +import io.micronaut.scheduling.annotation.ExecuteOn import io.micronaut.security.annotation.Secured import io.micronaut.security.authentication.AuthorizationException import io.micronaut.security.rules.SecurityRule @@ -50,6 +52,7 @@ import static io.micronaut.http.HttpHeaders.WWW_AUTHENTICATE @Requires(property = 'wave.metrics.enabled', value = 'true') @Secured(SecurityRule.IS_AUTHENTICATED) @Controller +@ExecuteOn(TaskExecutors.IO) class MetricsController { @Inject diff --git a/src/main/groovy/io/seqera/wave/controller/ValidateController.groovy b/src/main/groovy/io/seqera/wave/controller/ValidateController.groovy index 78f1d811d..631d0bcc8 100644 --- a/src/main/groovy/io/seqera/wave/controller/ValidateController.groovy +++ b/src/main/groovy/io/seqera/wave/controller/ValidateController.groovy @@ -22,10 +22,13 @@ import javax.validation.Valid import io.micronaut.http.annotation.Controller import io.micronaut.http.annotation.Post +import io.micronaut.scheduling.TaskExecutors +import io.micronaut.scheduling.annotation.ExecuteOn import io.seqera.wave.auth.RegistryAuthService import jakarta.inject.Inject import reactor.core.publisher.Mono +@ExecuteOn(TaskExecutors.IO) @Controller("/validate-creds") class ValidateController {