chore: remove eventing completion await#2503
Open
cristianonicolai wants to merge 1 commit into
Open
Conversation
cristianonicolai
temporarily deployed
to
internal
July 15, 2026 11:39 — with
GitHub Actions
Inactive
cristianonicolai
temporarily deployed
to
internal
July 15, 2026 11:39 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the worker post-processing flow to propagate the solveRequested flag into post-processors, and changes solver worker event emission to be non-blocking (no longer awaiting event-send completion).
Changes:
- Extend
ModelPostProcessor.processComputed(...)to accept asolveRequestedboolean and pass it through fromSolverWorker. - Update existing
processComputed(...)implementations to match the new signature. - Replace blocking event-send awaiting with asynchronous completion logging when emitting events.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| service/worker/src/main/java/ai/timefold/solver/service/worker/impl/SolverWorker.java | Passes solveRequested into post-processing and makes event emission non-blocking with async error logging. |
| service/worker/src/main/java/ai/timefold/solver/service/worker/impl/log/LogsPostProcessor.java | Updates processComputed signature to accept solveRequested. |
| service/maps/service-client/src/main/java/ai/timefold/solver/service/maps/service/client/impl/processors/SaveWaypointsPostProcessor.java | Updates processComputed signature to accept solveRequested. |
| service/definition/src/main/java/ai/timefold/solver/service/definition/api/ModelPostProcessor.java | Changes processComputed API to include solveRequested. |
cristianonicolai
force-pushed
the
chore/messaging
branch
from
July 15, 2026 11:50
80e7f6b to
ccf6990
Compare
cristianonicolai
temporarily deployed
to
internal
July 15, 2026 11:51 — with
GitHub Actions
Inactive
cristianonicolai
temporarily deployed
to
internal
July 15, 2026 11:51 — with
GitHub Actions
Inactive
Comment on lines
244
to
+248
| private void sendEvent(Emitter emitter, AbstractEvent event) { | ||
| try { | ||
| emitter.send(event).toCompletableFuture().get(EMITTER_TIMEOUT, TimeUnit.SECONDS); | ||
| } catch (ExecutionException | InterruptedException | TimeoutException e) { | ||
| if (e instanceof InterruptedException) { | ||
| Thread.currentThread().interrupt(); | ||
| } | ||
| LOGGER.error("Error sending event: {}, message: {}", event, e.getMessage(), e); | ||
| CompletionStage<Void> stage = emitter.send(event); | ||
| stage.whenComplete((v, ex) -> { | ||
| if (ex == null) { |
cristianonicolai
force-pushed
the
chore/messaging
branch
from
July 15, 2026 13:51
ccf6990 to
9272bf0
Compare
cristianonicolai
temporarily deployed
to
internal
July 15, 2026 13:52 — with
GitHub Actions
Inactive
cristianonicolai
temporarily deployed
to
internal
July 15, 2026 13:52 — with
GitHub Actions
Inactive
cristianonicolai
force-pushed
the
chore/messaging
branch
from
July 15, 2026 13:53
9272bf0 to
17ce61a
Compare
cristianonicolai
temporarily deployed
to
internal
July 15, 2026 13:53 — with
GitHub Actions
Inactive
cristianonicolai
temporarily deployed
to
internal
July 15, 2026 13:53 — with
GitHub Actions
Inactive
cristianonicolai
force-pushed
the
chore/messaging
branch
from
July 15, 2026 13:58
17ce61a to
0ea70cb
Compare
cristianonicolai
temporarily deployed
to
internal
July 15, 2026 13:58 — with
GitHub Actions
Inactive
cristianonicolai
temporarily deployed
to
internal
July 15, 2026 13:58 — with
GitHub Actions
Inactive
Comment on lines
+246
to
+250
| CompletionStage<Void> stage = emitter.send(event); | ||
| stage.whenComplete((v, ex) -> { | ||
| if (ex == null) { | ||
| return; | ||
| } |
cristianonicolai
temporarily deployed
to
internal
July 16, 2026 04:25 — with
GitHub Actions
Inactive
cristianonicolai
force-pushed
the
chore/messaging
branch
from
July 17, 2026 04:43
0ea70cb to
6f3b591
Compare
cristianonicolai
temporarily deployed
to
internal
July 17, 2026 04:43 — with
GitHub Actions
Inactive
cristianonicolai
temporarily deployed
to
internal
July 17, 2026 04:43 — with
GitHub Actions
Inactive
cristianonicolai
force-pushed
the
chore/messaging
branch
from
July 20, 2026 01:09
6f3b591 to
d838b4b
Compare
cristianonicolai
temporarily deployed
to
internal
July 20, 2026 01:09 — with
GitHub Actions
Inactive
Comment on lines
+248
to
+254
| stage.whenComplete((v, ex) -> { | ||
| if (ex == null) { | ||
| return; | ||
| } | ||
| var cause = ex.getCause() != null ? ex.getCause() : ex; | ||
| LOGGER.error("Error sending event: {}, message: {}", event, cause.getMessage(), cause); | ||
| }); |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.