Skip to content

Add single sync functionality for main client - #133

Merged
emmaz90 merged 2 commits into
single-syncfrom
ssync-main-client
Jun 14, 2022
Merged

Add single sync functionality for main client#133
emmaz90 merged 2 commits into
single-syncfrom
ssync-main-client

Conversation

@emmaz90

@emmaz90 emmaz90 commented Jun 13, 2022

Copy link
Copy Markdown
Contributor

Javascript commons library

What did you accomplish?

Added single sync functionality for main client

How do we test the changes introduced in this PR?

tests included

Extra Notes


syncManager.start();

expect(pollingManager.start).not.toBeCalled();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we pass to syncManagerOnlineFactory, a push manager and validate that the streaming flow hasn't been called either?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I get to work on it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was late reviewing this PR, but other option is to not instantiate the pushManager if singleSync is true.

const pushManager = !singleSync && streamingEnabled && pollingManager && pushManagerFactory ?
      pushManagerFactory(params, pollingManager) :
      undefined;

@emmaz90
emmaz90 merged commit d606ad1 into single-sync Jun 14, 2022
@emmaz90
emmaz90 deleted the ssync-main-client branch June 14, 2022 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants