mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-06 12:44:30 +08:00
[local-sync] Add a better reason when waking sync for syncback
Summary: see title Test Plan: nil Reviewers: mark Reviewed By: mark Differential Revision: https://phab.nylas.com/D3892
This commit is contained in:
parent
3a2f2ec6fc
commit
85dc9f319e
1 changed files with 3 additions and 3 deletions
|
@ -3,8 +3,8 @@ const Serialization = require('./serialization');
|
|||
const SyncProcessManager = require('../local-sync-worker/sync-process-manager')
|
||||
|
||||
|
||||
const wakeSyncWorker = _.debounce((accountId) => {
|
||||
SyncProcessManager.wakeWorkerForAccount(accountId, {interrupt: true})
|
||||
const wakeSyncWorker = _.debounce((accountId, reason) => {
|
||||
SyncProcessManager.wakeWorkerForAccount(accountId, {interrupt: true, reason})
|
||||
}, 500)
|
||||
|
||||
module.exports = {
|
||||
|
@ -17,7 +17,7 @@ module.exports = {
|
|||
const syncbackRequest = await db.SyncbackRequest.create(syncRequestArgs)
|
||||
|
||||
if (wakeSync) {
|
||||
wakeSyncWorker(account.id)
|
||||
wakeSyncWorker(account.id, `Need to run task ${syncbackRequest.type}`)
|
||||
}
|
||||
reply(Serialization.jsonStringify(syncbackRequest))
|
||||
return syncbackRequest
|
||||
|
|
Loading…
Add table
Reference in a new issue