diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-04-10 15:13:09 +0200 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-04-10 15:13:55 +0200 |
commit | 067f5f11c2f5c987697a78a42f23db1db1a90856 (patch) | |
tree | 783f1a5832eb6dc6b79e8ead7631773985240e43 /app/services | |
parent | 2cc0c692c082fddabcbb5ddc51e46d7996f5c3d7 (diff) | |
download | gitlab-ce-067f5f11c2f5c987697a78a42f23db1db1a90856.tar.gz |
Protect register_job_service from pending job with queued_at=nil
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/ci/register_job_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/ci/register_job_service.rb b/app/services/ci/register_job_service.rb index d46dcff34a1..b07b2fcba75 100644 --- a/app/services/ci/register_job_service.rb +++ b/app/services/ci/register_job_service.rb @@ -110,7 +110,7 @@ module Ci labels = { shared_runner: runner.shared?, jobs_running_for_project: jobs_running_for_project(job) } - job_queue_duration_seconds.observe(labels, Time.now - job.queued_at) + job_queue_duration_seconds.observe(labels, Time.now - job.queued_at) unless job.queued_at.nil? attempt_counter.increment end |