[local-sync] retry sync after error

This commit is contained in:
Evan Morikawa 2016-11-28 10:39:23 -08:00
parent 2c0c6164ec
commit 048e077cc5

View file

@ -152,9 +152,8 @@ class SyncWorker {
this._account.reload().then(() => {
console.log(this._account)
if (!process.env.SYNC_AFTER_ERRORS && this._account.errored()) {
this._logger.error(`SyncWorker: Account is in error state - Skipping sync\n${this._account.syncError.message}`, this._account.syncError.stack.join('\n'))
return Promise.resolve();
if (this._account.errored()) {
this._logger.error(`SyncWorker: Account is in error state - Retrying sync\n${this._account.syncError.message}`, this._account.syncError.stack.join('\n'))
}
this._logger.info({reason}, `SyncWorker: Account sync started`)