Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup e72113e send optaplanner test messages asynchronously #3546

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ public class OptaplannerResource {
@Path("solveSync")
public void solveSync() {
if (SolverStatus.NOT_SOLVING == solverManager.getSolverStatus(SINGLETON_TIME_TABLE_ID)) {
producerTemplate.sendBodyAndHeader("direct:solveSync", DataGenerator.timeTable, OptaPlannerConstants.SOLVER_MANAGER,
// The message payload is sent asynchronously, but the optaplanner route is configured to solve the problem synchronously
producerTemplate.asyncRequestBodyAndHeader("direct:solveSync", DataGenerator.timeTable,
OptaPlannerConstants.SOLVER_MANAGER,
solverManager);
}
}
Expand All @@ -72,7 +74,7 @@ public void solveSync() {
@Path("solveAsync")
public void solveAsync() throws ExecutionException, InterruptedException {
if (SolverStatus.NOT_SOLVING == solverManager.getSolverStatus(SINGLETON_TIME_TABLE_ID)) {
producerTemplate.sendBodyAndHeader("direct:solveAsync", DataGenerator.timeTable,
producerTemplate.asyncRequestBodyAndHeader("direct:solveAsync", DataGenerator.timeTable,
OptaPlannerConstants.SOLVER_MANAGER, solverManager);
}
}
Expand Down