diff --git a/api/src/job.js b/api/src/job.js index 6f137ce..8e8d022 100644 --- a/api/src/job.js +++ b/api/src/job.js @@ -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); }); }); }