Skip to content

Commit

Permalink
Fix stack overflow (#3501)
Browse files Browse the repository at this point in the history
Co-authored-by: kbirk <[email protected]>
  • Loading branch information
kbirk and kbirk authored May 2, 2024
1 parent c10632d commit 1cc7c62
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/client/hmi-client/src/types/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,6 @@ export interface CiemssStatusUpdate {
loss: number;
progress: number;
jobId: string;
dataToPersist: any;
}

export interface EnsembleCalibrationCiemssRequest {
Expand Down Expand Up @@ -727,7 +726,6 @@ export interface ScimlStatusUpdate {
id: string;
solData: { [index: string]: any };
timesteps: number[];
dataToPersist: any;
}

export interface SimulationRequest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package software.uncharted.terarium.hmiserver.models.simulationservice;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;
Expand All @@ -16,6 +17,7 @@ public class CiemssStatusUpdate {
@JsonAlias("job_id")
private String jobId;

@JsonIgnore
public JsonNode getDataToPersist() {
final ObjectMapper mapper = new ObjectMapper();
return mapper.valueToTree(this);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package software.uncharted.terarium.hmiserver.models.simulationservice;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
Expand Down Expand Up @@ -32,6 +33,7 @@ public class ScimlStatusUpdate {
// List of timesteps
private List<Number> timesteps;

@JsonIgnore
public JsonNode getDataToPersist() {
final ObjectMapper mapper = new ObjectMapper();
final JsonNode jsonNode = mapper.valueToTree(this);
Expand Down

0 comments on commit 1cc7c62

Please sign in to comment.