Skip to content

Commit

Permalink
chore: override state transitions into topic
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-mage committed Sep 6, 2024
1 parent 991fa35 commit 032644b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ void setState(State current, StateTransitionEvent stateTransitionEvent) {
// Sync on State.class to make sure the order of setValue and globalNotifyStateChanged
// are consistent across different services.
try (LockScope ls = LockScope.lock(globalLock)) {
stateTopic.withValue(newState.ordinal());
statusCodeTopic.withValue(stateTransitionEvent.getStatusCode().name());
statusReasonTopic.withValue(stateTransitionEvent.getStatusReason());
stateTopic.overrideValue(newState.ordinal());
statusCodeTopic.overrideValue(stateTransitionEvent.getStatusCode().name());
statusReasonTopic.overrideValue(stateTransitionEvent.getStatusReason());
greengrassService.getContext().globalNotifyStateChanged(greengrassService, current, newState);
}
}
Expand Down

0 comments on commit 032644b

Please sign in to comment.