diff --git a/src/main/groovy/io/seqera/wave/controller/MetricsController.groovy b/src/main/groovy/io/seqera/wave/controller/MetricsController.groovy index 192a08be3..273a07153 100644 --- a/src/main/groovy/io/seqera/wave/controller/MetricsController.groovy +++ b/src/main/groovy/io/seqera/wave/controller/MetricsController.groovy @@ -30,6 +30,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 @@ -52,6 +54,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 {