Mailspring/packages/isomorphic-core
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
..
src [local-sync] Back off exponentially when getting a sync error 2017-01-15 11:57:47 -08:00
index.js [local-sync]: Move sendmail-client and errors to isomorphic-core 2016-12-15 12:29:56 -08:00
package.json Update sequelize point version everywhere 2017-01-04 15:47:16 -08:00