Skip to content
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

switch mobile UI to use background worker based sync #2206

Open
githubbob42 opened this issue May 4, 2019 · 1 comment
Open

switch mobile UI to use background worker based sync #2206

githubbob42 opened this issue May 4, 2019 · 1 comment
Labels

Comments

@githubbob42
Copy link
Owner

Mingle Card: 2449
See #2439 for story details.

Task

When we are ready (all the other task cards for this story are complete), we'll want to switch over the sync mechanism to use background workers. This will mean we'll need a feature toggle.

CC: I'd suggest we toggle the feature using a node environment variable - something like BACKGROUND_SYNC. We'll need to consider how to then access this from the client. We have a few options:

  • Inject the env var into the client js script (we'll need to be careful with caching)
  • Inject the env var into the markup (again, we'll need to consider caching)
  • Inject the env var into the sync (although now there'll be two locations - one for each of the sync implementations).

After requesting the new sync, the client should continue to show the spinner, and disable the sync button as per the current sync.

Ideally, the decision of what sync to trigger and the return of the results will be encapsulated by `queries/sync-query` - the api will remain as:

Promise<syncdata> execute()

This will allow the rest of the client to remain unchanged.

@githubbob42
Copy link
Owner Author

Story: #2196 User initiates a sync request on the client (Mingle)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant