Skip to content

Commit

Permalink
Ignore empty cloud sync push actions
Browse files Browse the repository at this point in the history
- Some DB deletes occur which result in no records being deleted, but they still trigger empty cloud sync push actions which unnecessarily invoke sync UL function
  • Loading branch information
poltak committed Jun 18, 2024
1 parent 1d73648 commit 11b681a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/personal-cloud/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,10 @@ export class PersonalCloudBackground {
// For automated tests
this.reportExecutingAction?.(action)

if (action.type === PersonalCloudActionType.PushObject) {
if (
action.type === PersonalCloudActionType.PushObject &&
action.updates.length > 0
) {
const {
clientInstructions,
} = await this.options.backend.pushUpdates(
Expand Down

0 comments on commit 11b681a

Please sign in to comment.