Fix crash
This commit is contained in:
parent
a40b581ee9
commit
86a88d44b7
|
@ -144,10 +144,8 @@ class Job {
|
|||
usePs: true,
|
||||
}, (err, stat) => {
|
||||
if (err) {
|
||||
this.logger.error(`Error getting process stats:`, err);
|
||||
reject(err);
|
||||
}
|
||||
|
||||
this.logger.debug(`Got error while getting stats:`, err);
|
||||
} else {
|
||||
let res = {
|
||||
'cpu': stat.cpu,
|
||||
'memory': stat.memory,
|
||||
|
@ -159,6 +157,7 @@ class Job {
|
|||
this.logger.debug(`Got stats:`, res);
|
||||
|
||||
resolve(res);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue