Skip to content

Commit

Permalink
Decode debug header
Browse files Browse the repository at this point in the history
Signed-off-by: Thang PHAM <[email protected]>
  • Loading branch information
thangqp committed Dec 2, 2024
1 parent e5a7f0b commit cead795
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.io.UncheckedIOException;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;

import static com.powsybl.ws.commons.computation.service.NotificationService.*;
Expand Down Expand Up @@ -55,6 +56,7 @@ public static DynamicSimulationResultContext fromMessage(Message<String> message
String reporterId = (String) headers.get(REPORTER_ID_HEADER);
String reportType = (String) headers.get(REPORT_TYPE_HEADER);
String userId = (String) headers.get(HEADER_USER_ID);
Boolean debug = (Boolean) headers.get(DEBUG_HEADER);

DynamicSimulationRunContext runContext = DynamicSimulationRunContext.builder()
.networkUuid(networkUuid)
Expand All @@ -64,6 +66,7 @@ public static DynamicSimulationResultContext fromMessage(Message<String> message
.reportInfos(ReportInfos.builder().reportUuid(reportUuid).reporterId(reporterId).computationType(reportType).build())
.userId(userId)
.parameters(parametersInfos)
.debug(Optional.ofNullable(debug).orElse(false))
.build();

// specific headers for dynamic simulation
Expand Down

0 comments on commit cead795

Please sign in to comment.