Mailspring/internal_packages/deltas/lib
Evan Morikawa 0be186302a refactor(account): remove unused accont refresh methods
Summary:
This removes `refreshHealthOfAccounts`, which I originally found because I
was trying to refactor it out of the IdentityStore. We need it gone from
the IdentityStore so that store can trigger frequently as things like the
usageLimits constantly update on it.

This also fixes T7520 where we'd get `ECONNREFUSED 127.0.0.1:2578` on
launch unnecessarily.

The concept of refreshing the health of accounts by occassionally polling
the /accounts endpoint is obsolete. This depends on
D3769 which entirely removes the /accounts endpoint
from K2.

Account health is pushed to us by `Actions.updateAccount` which is fired
directly from the main local-sync sync loop.

This also removes `refreshAccounts` and `Actions.refreshAllDeltaConnections`. These were fired by the Identity Store whenever it updated. We no longer need the Identity Store to tell us to reset the delta connections with our local-sync accounts. The delta connections will either be reset by our offline notification button, or when adding or removing an account. The Identity Store was a redundant mechanisms

Test Plan:
Manually verify things work with an existing account. Add a new account
and ensure sync starts. Remove an account and ensure it gets cleaned up.

Reviewers: halla, khamidou, mark, juan

Reviewed By: juan

Maniphest Tasks: T7520

Differential Revision: https://phab.nylas.com/D3770
2017-01-25 10:12:09 -05:00
..
account-delta-connection-pool.es6 refactor(account): remove unused accont refresh methods 2017-01-25 10:12:09 -05:00
account-delta-connection.es6 refactor(name): rename worker-sync package to deltas 2017-01-25 10:08:23 -05:00
contact-rankings-cache.es6 refactor(name): rename worker-sync package to deltas 2017-01-25 10:08:23 -05:00
delta-processor.es6 refactor(name): rename worker-sync package to deltas 2017-01-25 10:08:23 -05:00
delta-streaming-connection.es6 refactor(name): rename worker-sync package to deltas 2017-01-25 10:08:23 -05:00
delta-streaming-in-memory-connection.es6 refactor(name): rename worker-sync package to deltas 2017-01-25 10:08:23 -05:00
main.coffee refactor(name): rename worker-sync package to deltas 2017-01-25 10:08:23 -05:00
refreshing-json-cache.coffee refactor(name): rename worker-sync package to deltas 2017-01-25 10:08:23 -05:00