[client-sync] 🎨 logging

This commit is contained in:
Juan Tejada 2017-04-05 09:22:00 -07:00
parent d75a5ee243
commit a3072f6b04
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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')
}