feat!: expose server sync enabled app config property #2822
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Description
Exposes new app config properties:
SERVER.sync.enabled
boolean
true
false
, attempts to sync data to the server are blocked, whether triggered through a template action or the regularly scheduled syncingSERVER.sync.enabled
number
1000 * 60 * 5
(5 minutes)SERVER_SYNC_FREQUENCY_MS
property. Sets how often the app will attempt to sync data to the serverBreaking changes
This is marked as a breaking change since it removes the previous app config property,
SERVER_SYNC_FREQUENCY_MS
. However, as far as I can tell, this property is not overridden for any active deployment (the default value is 5 minutes), so there shouldn't actually be any knock-ons for authors.Follow-up
Whilst this does address the linked issue, it doesn't fully address the intended use case: as the app performs a sync on launch (specifically on init of the server service), the user data is still at risk of being overwritten, even if the launch templates disable sync. #2684 would also be required to prevent this overwrite. As that may not be straightforward to implement, we may want to consider another short-term option to handle the desired user journey.
Git Issues
Closes #2819
Screenshots/Videos
New debug template: feat_server_sync_disabled
Note
[SERVER] sync disabled
console log when triggering a sync attempt, and contrast with behaviour on debug_sync_id template.