-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add throttle and delay to connect #478
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 769b46f The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@stevensJourney this is ready for review |
packages/common/src/client/sync/stream/AbstractStreamingSyncImplementation.ts
Show resolved
Hide resolved
12b6560
to
769b46f
Compare
connector: PowerSyncBackendConnector, | ||
// This is used to pass in options on connection instead of only during database creation | ||
options?: { | ||
retryDelayMs: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use AdditionalConnectionOptions
* Delay for retrying sync streaming operations | ||
* from the PowerSync backend after an error occurs. | ||
*/ | ||
retryDelay?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very unfortunate, but I think renaming this to retryDelayMs
is a breaking change. We might be able to work around it, but we should keep the old field for consistency.
Description
Add
retryDelayMs
andcrudUploadThrottleMs
toconnect
so that the values can be dynamically changed on reconnecting.Testing
I ran the todolist demo and confirmed that the values used are from the connect method.