Skip to content

Commit

Permalink
feat: avoid InterruptedException and rename
Browse files Browse the repository at this point in the history
Signed-off-by: Joris Mancini <[email protected]>
  • Loading branch information
TheMaskedTurtle committed Dec 13, 2024
1 parent f1b06a7 commit a3580b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void startBuild(BuildExecContext execContext) {
BuildInfos buildInfos = execContext.getBuildInfos();
CompletableFuture<NetworkModificationResult> future = execBuildVariant(execContext, buildInfos);
NetworkModificationResult result;
if (future != null && (result = future.get()) != null) { // result available
if (future != null && (result = future.join()) != null) { // result available
notificationService.emitBuildResultMessage(result, execContext.getReceiver());
LOGGER.info("Build complete on node '{}'", execContext.getReceiver());
} else { // result not available : stop build request
Expand All @@ -120,8 +120,6 @@ private void startBuild(BuildExecContext execContext) {
}
} catch (CancellationException e) {
stoppedPublisherService.publishCancel(execContext.getReceiver(), CANCEL_MESSAGE);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} catch (Exception e) {
throw new BuildException("Node build failed", e);
} finally {
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/config/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ spring:
consumer:
auto-bind-dlq: true
dead-letter-exchange: ${powsybl-ws.rabbitmq.destination.prefix:}build.run.dlx
dead-letter-routing-key: "#"
dead-letter-queue-name: ${powsybl-ws.rabbitmq.destination.prefix:}build.run.dlq
dead-letter-queue-name: ${powsybl-ws.rabbitmq.destination.prefix:}build.run.dlx.dlq
dead-letter-exchange-type: topic
quorum:
enabled: true
delivery-limit: 2
Expand Down

0 comments on commit a3580b6

Please sign in to comment.