diff --git a/lib/backchannel.js b/lib/backchannel.js index c173843f5..bc2bfe641 100644 --- a/lib/backchannel.js +++ b/lib/backchannel.js @@ -155,7 +155,11 @@ BackChannel.prototype = { if (err) return console.error('Error finding job', err.message) if (!job) return console.error('job.done but job not found:', data.id) _.extend(job, data) - job.duration = data.finished.getTime() - data.started.getTime() + try { + job.duration = data.finished.getTime() - data.started.getTime() + } catch (ignore) { + job.duration = 1 + } job.markModified('phases') job.markModified('plugin_data') job.test_exitcode = job.phases.test && job.phases.test.exitCode