Skip to content

Commit

Permalink
do not sync things without a policyId
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Guggemos <dominik.guggemos@bosch.io>
  • Loading branch information
dguggemos committed Jun 1, 2022
1 parent 7d0adb2 commit e4d1492
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ private Source<Metadata, NotUsed> emitUnlessConsistent(final Metadata persisted,
);
return Source.completionStageSource(askFuture);
} else {
// policy ID does not exist: entry should be updated in search index
return Source.single(persisted);
// policy ID does not exist: entry should not be updated in search index
return Source.empty();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ public static Props props(final BackgroundSyncConfig config,
@Override
protected void preEnhanceSleepingBehavior(final ReceiveBuilder sleepingReceiveBuilder) {
sleepingReceiveBuilder.matchEquals(Control.BOOKMARK_THING_ID,
trigger ->
// ignore scheduled bookmark messages when sleeping
trigger -> // ignore scheduled bookmark messages when sleeping
log.debug("Ignoring: <{}>", trigger)
)
.match(ThingId.class, thingId ->
Expand Down

0 comments on commit e4d1492

Please sign in to comment.