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 => { resolve: value => {
_removeJob(id); _removeJob(id);
const end = Date.now(); const end = Date.now();
const delta = end - start;
if (delta > 10) {
window.log.info( window.log.info(
`SQL channel job ${id} (${fnName}) succeeded in ${end - start}ms` `SQL channel job ${id} (${fnName}) succeeded in ${end - start}ms`
); );
}
return resolve(value); return resolve(value);
}, },
reject: error => { reject: error => {