Fix crash

This commit is contained in:
Всеволод 2024-03-02 20:16:00 +03:00
parent a40b581ee9
commit 86a88d44b7
1 changed files with 13 additions and 14 deletions

View File

@ -144,10 +144,8 @@ class Job {
usePs: true, usePs: true,
}, (err, stat) => { }, (err, stat) => {
if (err) { if (err) {
this.logger.error(`Error getting process stats:`, err); this.logger.debug(`Got error while getting stats:`, err);
reject(err); } else {
}
let res = { let res = {
'cpu': stat.cpu, 'cpu': stat.cpu,
'memory': stat.memory, 'memory': stat.memory,
@ -159,6 +157,7 @@ class Job {
this.logger.debug(`Got stats:`, res); this.logger.debug(`Got stats:`, res);
resolve(res); resolve(res);
}
}); });
}); });
} }