Improved steps in profiling

This commit is contained in:
Daniel García Aubert 2016-05-27 12:41:24 +02:00
parent 976bf5b039
commit cf1e072c17

View File

@ -66,7 +66,7 @@ JobRunner.prototype._run = function (job, query, callback) {
self.profiler.done('failed'); self.profiler.done('failed');
job.setStatus(jobStatus.FAILED, err.message); job.setStatus(jobStatus.FAILED, err.message);
} else { } else {
self.profiler.done('done'); self.profiler.done('success');
job.setStatus(jobStatus.DONE); job.setStatus(jobStatus.DONE);
} }
} catch (err) { } catch (err) {
@ -78,6 +78,7 @@ JobRunner.prototype._run = function (job, query, callback) {
return callback(err); return callback(err);
} }
self.profiler.done('done');
self.profiler.end(); self.profiler.end();
self.profiler.sendStats(); self.profiler.sendStats();