Summary:
We were mostly ignoring errors in our delta streaming connections. This
commit makes it so that if we get an authentication error from n1Cloud we mark the
account as invalid so users know to re authenticate, and can properly receive metadata deltas
If the error is not an authentication error, it automatically retries
the delta connection.
Addresses T7744
Test Plan: manual
Reviewers: evan, spang, halla
Reviewed By: halla
Differential Revision: https://phab.nylas.com/D3813
Summary:
This diff is a rename. No logical changes.
We used to have a set of files called `nylas-sync-worker`. In Old N1 these
used to have a lot of logic to slowly sync mail from our API. Since we
exclusively use local-sync via a soon-to-be-obsolesced delta stream, these
files really just manage the delta streaming connection.
It's incredibly confusing to have a set of files called worker-sync when
there's a sync-worker already in the codebase. This renames everything to
refer to them as account sync workers.
The reason I wanted this rename is because the IdentityStore on initial
launch triggers and fires a fairly scary-sounding
`Actions.refreshAllSyncWorkers()`. In reality all it does is
`Actions.refreshAllDeltaConnections()`. I'm also tired of staring at files
for a full minute before realizing that this is not the sync worker I was
looking for.
Test Plan:
After rename, booted the app and ensured that deltas were coming through
for new mail and no errors were being thrown
Reviewers: halla, juan
Reviewed By: juan
Differential Revision: https://phab.nylas.com/D3767
2017-01-25 10:08:23 -05:00
Renamed from internal_packages/worker-sync/lib/delta-streaming-connection.es6 (Browse further)