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.
This adds rate limiting to the CoreImporter so that we don't have to rely on the hacky workaround in
nudgeUnsynced
to get large imports unstuck:simplenote-electron/lib/utils/sync/nudge-unsynced.js
Line 42 in 0b079b9
With my new familiarity with the LocalQueue 😌, I was able to realize that the stuck import notes were not stuck locally, nor were they being "ignored" by the server. They were sent out correctly, but then each of them were being returned 503 errors from the Simperium server.
@roundhill:
node-simperium
be patched to handle these errors?To test
localStorage.debug="sync:*,analytics"
and reload.The syncing should complete, and
nudgeUnsynced
shouldn't log anything other than0 unsynced notes
. (Or, you can try commenting out theclient.client.connect()
line quoted above.)Import file (1000 notes) for your convenience: few-tags-1000-800kb.json.zip
Next steps
Now that this is out of the way, I will modify the
nudgeUnsynced
function so that it specifically addresses thev === 0
notes that resulted from unpersisted offline changes (#1098). We'll get rid of theclient.connect()
call there, thus fixing theinit
flood once and for all 🔨