mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-13 03:29:46 +08:00
fix(tasks): Report slow performLocal only when it takes > 500ms
This commit is contained in:
parent
42274b656c
commit
cef3060623
1 changed files with 2 additions and 2 deletions
|
@ -141,8 +141,8 @@ class TaskQueue
|
|||
task.runLocal()
|
||||
.then =>
|
||||
runLocalTime = Date.now() - runLocalStart
|
||||
if runLocalTime >= 150
|
||||
err = new Error("Task peformLocal took more than 150ms")
|
||||
if runLocalTime >= 500
|
||||
err = new Error("Task peformLocal took more than 500ms")
|
||||
NylasEnv.reportError(err, {task: task.toJSON(), duration: runLocalTime, taskName: task.constructor.name})
|
||||
@_queue.push(task)
|
||||
@_updateSoon()
|
||||
|
|
Loading…
Reference in a new issue