Mailspring/packages/local-sync/src
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
..
local-api [local-sync] Cleanup, use Provider constants 2017-01-14 14:31:51 -08:00
local-sync-dashboard [local-sync] Fix authentication notifications 2016-12-21 07:22:39 -05:00
local-sync-worker [local-sync] Back off exponentially when getting a sync error 2017-01-15 11:57:47 -08:00
message-processor [local-sync] Update comment on _processExistingMessage 2017-01-15 10:06:52 -08:00
models [local-sync] fix performance of attribute changes 2017-01-14 17:27:15 -08:00
shared [local-sync] Stop sync worker before deleting account database 2017-01-15 10:33:12 -08:00