mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 18:47:51 +08:00
[local-sync] Save error when clearing tasks INPROGRESS
This commit is contained in:
parent
83744c73d0
commit
4769d4d476
2 changed files with 2 additions and 1 deletions
|
@ -25,7 +25,7 @@ class FetchNewMessagesInFolderIMAP extends FetchMessagesInFolderIMAP {
|
||||||
// operation
|
// operation
|
||||||
// Can't use `super` in this scenario because babel can't compile it under
|
// Can't use `super` in this scenario because babel can't compile it under
|
||||||
// these conditions. User regular prototype instead
|
// these conditions. User regular prototype instead
|
||||||
console.log(`🔚 📂 🆕$ {this._folder.name} has no fetchedmax - running regular fetch operation`)
|
console.log(`🔚 📂 🆕 ${this._folder.name} has no fetchedmax - running regular fetch operation`)
|
||||||
yield FetchMessagesInFolderIMAP.prototype.runTask.call(this, db, imap)
|
yield FetchMessagesInFolderIMAP.prototype.runTask.call(this, db, imap)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,6 +105,7 @@ export async function markInProgressTasksAsFailed({db} = {}) {
|
||||||
|
|
||||||
for (const inProgress of inProgressTasks) {
|
for (const inProgress of inProgressTasks) {
|
||||||
inProgress.status = 'FAILED';
|
inProgress.status = 'FAILED';
|
||||||
|
inProgress.error = new Error('Lingering task in progress was marked as failed')
|
||||||
await inProgress.save();
|
await inProgress.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue