Mailspring/packages
Juan Tejada 7b63912955 [local-sync] Correctly retry syncback tasks
Summary:
Previously, we attempted to immeditely retry syncback tasks when a
RetryableError was encountered. However, if the error was an
IMAPConnection error, we would keep retrying with a broken connection,
which would keep failing.

The correct way to retry is to wait for the next sync loop, since at the
beginning of each loop we ensure that we are correctly connected to
imap.

To achieve this this commit simply marks a failed task as NEW if it
encoutners a RetryableError and we haven't retried too many times. To
keep track of the number of retries, we save a new field in the `props`
field of the request.

Test Plan: manual

Reviewers: evan, halla, mark, spang

Reviewed By: spang

Subscribers: khamidou

Differential Revision: https://phab.nylas.com/D3831
2017-02-02 17:19:13 -08:00
..
isomorphic-core [local-sync] Account for additional IMAP retryable errors 2017-01-31 10:53:43 -08:00
local-private [*] update nylas/N1 to nylas/nylas-mail GitHub link 2017-01-30 11:50:15 -08:00
local-sync [local-sync] Correctly retry syncback tasks 2017-02-02 17:19:13 -08:00