mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
Fix crash
This commit is contained in:
parent
a40b581ee9
commit
86a88d44b7
1 changed files with 13 additions and 14 deletions
|
@ -144,21 +144,20 @@ 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,
|
||||
'ctime': stat.ctime,
|
||||
'elapsed': stat.elapsed,
|
||||
'timestamp': stat.timestamp,
|
||||
};
|
||||
|
||||
this.logger.debug(`Got stats:`, res);
|
||||
|
||||
resolve(res);
|
||||
}
|
||||
|
||||
let res = {
|
||||
'cpu': stat.cpu,
|
||||
'memory': stat.memory,
|
||||
'ctime': stat.ctime,
|
||||
'elapsed': stat.elapsed,
|
||||
'timestamp': stat.timestamp,
|
||||
};
|
||||
|
||||
this.logger.debug(`Got stats:`, res);
|
||||
|
||||
resolve(res);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue