mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-11 23:24:32 +08:00
[client-sync] 🎨 logging
This commit is contained in:
parent
d75a5ee243
commit
a3072f6b04
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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')
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue