Mailspring/packages/local-sync
Karim Hamidou aadc322ef4 [local-sync] Back off exponentially when getting a sync error
Summary:
This patch changes the sync worker to back off exponentially when there is an issue syncing an account. This has two goals:
- first, it's a bit dangerous to retry immediately. We don't want hundreds of thousands of machines trying to refresh tokens unsuccessfully because our service is struggling.
- second, it's nicer on the CPU to wait a bit between retries.

Currently, we sleep for at most 2 minutes, with some random jitter added.

Test Plan: Tested manually, stared at the code a long time.

Reviewers: evan, juan

Reviewed By: evan, juan

Differential Revision: https://phab.nylas.com/D3684
2017-01-15 11:57:47 -08:00
..
images [dashboard] Put dashboard into work window 2016-11-28 18:02:42 -08:00
spec [local-sync] For generic IMAP, Thread based on Message-Id, In-Reply-To & References 2017-01-13 10:39:54 -08:00
src [local-sync] Back off exponentially when getting a sync error 2017-01-15 11:57:47 -08:00
stylesheets [💄] fix eslint issues before they get overwhelming 2016-12-01 15:37:48 -08:00
main.es6 [local-sync] Cleanup sync tasks to be more consistent with syncback tasks 2017-01-13 12:30:43 -08:00
package.json Update Nylas N1 to Nylas Mail 2017-01-12 11:25:39 -08:00