From a3072f6b0474d0f6ff513525336bf8801be41e3f Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Wed, 5 Apr 2017 09:22:00 -0700 Subject: [PATCH] [client-sync] :art: logging --- .../client-sync/src/local-sync-worker/sync-process-manager.es6 | 2 +- packages/client-sync/src/local-sync-worker/sync-worker.es6 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client-sync/src/local-sync-worker/sync-process-manager.es6 b/packages/client-sync/src/local-sync-worker/sync-process-manager.es6 index 6530fa27b..ee4444a56 100644 --- a/packages/client-sync/src/local-sync-worker/sync-process-manager.es6 +++ b/packages/client-sync/src/local-sync-worker/sync-process-manager.es6 @@ -110,7 +110,7 @@ class SyncProcessManager { const {Account} = await LocalDatabaseConnector.forShared(); const account = await Account.findById(accountId) const logger = global.Logger.forAccount(account) - logger.warn(`SyncProcessManager: Detected stuck worker`, activity, time) + logger.warn(`SyncProcessManager: Detected stuck worker. Last recorded activity: ${activity} at ${new Date(time)}`) await this.removeWorkerForAccountId(accountId, {timeout: 5 * 1000}) await this.addWorkerForAccount(account) diff --git a/packages/client-sync/src/local-sync-worker/sync-worker.es6 b/packages/client-sync/src/local-sync-worker/sync-worker.es6 index da56c2945..61181c9f9 100644 --- a/packages/client-sync/src/local-sync-worker/sync-worker.es6 +++ b/packages/client-sync/src/local-sync-worker/sync-worker.es6 @@ -638,7 +638,7 @@ class SyncWorker { this._syncTimer = null; try { if (this._syncInProgress) { - let promise = this.interrupt({reason: "Sync stopped"}) + let promise = this.interrupt({reason: "Sync worker destroyed"}) if (timeout) { promise = promise.timeout(timeout, 'Interrupt timed out while destroying worker') }