Skip to content

Commit

Permalink
Update SimulationMessage to latest structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
flawmop committed Dec 20, 2024
1 parent f64a4fa commit 25bcf9a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
HELP.md
.gradle
bindings
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ tasks.named('bootBuildImage') {

tasks.named('test') {
useJUnitPlatform()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public class SimulationInvokeConfig {

@Bean
Consumer<Flux<SimulationMessage>> simulationInvoke() {
return flux -> flux.map(simulationMessage -> simulationMessage.modelId())
.doOnNext(modelId -> log.info("The simulation with model id {} is invoked", modelId))
return flux -> flux.doOnNext(simulationMessage -> log.info("The simulation {} is invoked", simulationMessage))
.subscribe();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.insilicosoft.portal.svc.simulationinvoke.event;

import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;

public record SimulationMessage(int modelId, Float pacingFrequency, Float pacingMaxTime,
List<Float> plasmaPoints) {
public record SimulationMessage(long simulationId, int modelId, BigDecimal pacingFrequency,
BigDecimal pacingMaxTime, List<BigDecimal> plasmaPoints) {

public SimulationMessage {
Objects.requireNonNull(pacingFrequency, "pacingFrequency is required");
Expand Down

0 comments on commit 25bcf9a

Please sign in to comment.