From 4be14238f9a213512b14d1f5a6d1afc08ad4359d Mon Sep 17 00:00:00 2001 From: Gabriele Cardosi Date: Wed, 4 Dec 2024 09:15:44 +0100 Subject: [PATCH] [DBACLD-157599] Removing blocking completablefuture.get invocation (#2148) Co-authored-by: Gabriele-Cardosi --- .../org/kie/kogito/jobs/embedded/JobInVMEventPublisher.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jobs-service/kogito-addons-jobs-service/kogito-addons-quarkus-jobs/src/main/java/org/kie/kogito/jobs/embedded/JobInVMEventPublisher.java b/jobs-service/kogito-addons-jobs-service/kogito-addons-quarkus-jobs/src/main/java/org/kie/kogito/jobs/embedded/JobInVMEventPublisher.java index 78434dc841..ba7b0e1ef8 100644 --- a/jobs-service/kogito-addons-jobs-service/kogito-addons-quarkus-jobs/src/main/java/org/kie/kogito/jobs/embedded/JobInVMEventPublisher.java +++ b/jobs-service/kogito-addons-jobs-service/kogito-addons-quarkus-jobs/src/main/java/org/kie/kogito/jobs/embedded/JobInVMEventPublisher.java @@ -20,7 +20,6 @@ package org.kie.kogito.jobs.embedded; import java.util.List; -import java.util.concurrent.ExecutionException; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.kie.kogito.event.EventPublisher; @@ -81,9 +80,9 @@ public JobDetails publishJobStatusChange(JobDetails jobDetails) { return jobDetails; } - bus.fireAsync(new EmbeddedJobServiceEvent(jobDetails)).toCompletableFuture().get(); + bus.fireAsync(new EmbeddedJobServiceEvent(jobDetails)); return jobDetails; - } catch (InterruptedException | ExecutionException e) { + } catch (Exception e) { throw new RuntimeException(e); } }