Skip to content

Commit

Permalink
Fix ThingUpdater stopping timers twice. Change default of expected ro…
Browse files Browse the repository at this point in the history
…les.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
  • Loading branch information
yufei-cai committed Apr 14, 2022
1 parent ad15dde commit 1abf05b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ enum ClusterRolesConfigValue implements KnownConfigValue {
ENABLED("enabled", true),

EXPECTED("expected",
Arrays.asList("policies", "things", "things-search", "gateway", "connectivity", "concierge"));
Arrays.asList("policies", "things", "search", "gateway", "connectivity", "concierge"));

private final String path;
private final Object defaultValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ private FSM.State<State, Data> onResult(final Result result, final Data data) {
private FSM.State<State, Data> onDone(final Done done, final Data data) {
killSwitch = null;
log.debug("Update skipped");
return goTo(State.READY);
return goTo(State.READY).using(new Data(data.metadata().export(), data.lastWriteModel()));
}

private FSM.State<State, Data> tick(final Control tick, final Data data) {
Expand Down Expand Up @@ -504,7 +504,7 @@ private UniqueKillSwitch recoverLastWriteModel(final ThingId thingId,
}

private void tickNow() {
startTimerWithFixedDelay(Control.TICK.name(), Control.TICK, writeInterval);
cancelTimer(Control.TICK.name());
getSelf().tell(Control.TICK, ActorRef.noSender());
}

Expand Down

0 comments on commit 1abf05b

Please sign in to comment.