Mailspring/internal_packages/notifications/lib
Ben Gotow 215fa0e4cb fix(initial-sync): When an error is encountered, do not start fetching from zero again
Summary:
Previously, when an error was encountered during initial mailbox sync we just started it
over after a retry delay. Recent API uptime issues mean that this was happening often and lots of
people were seeing sync retry many times. This is bad because the app is less performant while
it's syncing mail, and also generates unnecessary load as the app re-fetches threads it already has.

In this diff, there are new specs and functionality in nylas-sync-worker to start fetching
where we left off. This is typically going to be OK because the default sort ordering of the
threads endpoint is newest->oldest, so if new items have arrived since we started fetching
and page boundaries have changed, we'll get duplicate data rather than missing data. Connceting
to the streaming API as soon as we start the sync also ensures that we roll up any changes to
data we've already paginated over.

Test Plan: Run tests

Reviewers: drew, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2132
2015-10-08 19:02:54 -07:00
..
activity-sidebar-long-poll-store.coffee fix(activity-sidebar): render correct copy on only correct moments 2015-09-22 14:05:26 -07:00
activity-sidebar.cjsx switch(env): Move N1 to Nylas production API 2015-10-02 15:01:31 -07:00
initial-sync-activity.cjsx fix(initial-sync): When an error is encountered, do not start fetching from zero again 2015-10-08 19:02:54 -07:00
main.cjsx feat(plugins): Restore the plugins sidebar view 2015-10-03 18:11:36 -07:00
notifications-sticky-bar.cjsx feat(accounts): Kill namespaces, long live accounts 2015-08-21 15:29:58 -07:00
notifications-store.coffee fix(notifications): Add a purple tint color for developer notification 2015-10-04 00:22:59 -07:00