Only show database log entries if task takes longer than 10ms

This commit is contained in:
Scott Nonnenberg 2018-10-31 15:43:36 -07:00
parent 1755e0adfd
commit 6628b73911

View file

@ -196,9 +196,12 @@ function _updateJob(id, data) {
resolve: value => {
_removeJob(id);
const end = Date.now();
window.log.info(
`SQL channel job ${id} (${fnName}) succeeded in ${end - start}ms`
);
const delta = end - start;
if (delta > 10) {
window.log.info(
`SQL channel job ${id} (${fnName}) succeeded in ${end - start}ms`
);
}
return resolve(value);
},
reject: error => {