Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/stuck_ci_jobs_worker.rb')
-rw-r--r--app/workers/stuck_ci_jobs_worker.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/workers/stuck_ci_jobs_worker.rb b/app/workers/stuck_ci_jobs_worker.rb
index 7e3f7275b55..6e4ffa36854 100644
--- a/app/workers/stuck_ci_jobs_worker.rb
+++ b/app/workers/stuck_ci_jobs_worker.rb
@@ -2,7 +2,7 @@
class StuckCiJobsWorker
include ApplicationWorker
- include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
+ include CronjobQueue
feature_category :continuous_integration
worker_resource_boundary :cpu
@@ -56,13 +56,13 @@ class StuckCiJobsWorker
loop do
jobs = Ci::Build.where(status: status)
.where(condition, timeout.ago)
- .includes(:tags, :runner, project: :namespace)
+ .includes(:tags, :runner, project: [:namespace, :route])
.limit(100)
.to_a
break if jobs.empty?
jobs.each do |job|
- yield(job)
+ with_context(project: job.project) { yield(job) }
end
end
end