diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-12-18 16:29:48 -0200 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-12-18 16:48:59 -0200 |
commit | cafc543ce882f58abbd04b632a965d57b36e8ff6 (patch) | |
tree | 6a21c2dd9457fcc81e1385da9fddcdf459aa9025 /app/workers | |
parent | aa2c729e8e90968419d59281c0e6021f77877060 (diff) | |
download | gitlab-ce-cafc543ce882f58abbd04b632a965d57b36e8ff6.tar.gz |
Adjust flaky Rails logger call test
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/stuck_merge_jobs_worker.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/workers/stuck_merge_jobs_worker.rb b/app/workers/stuck_merge_jobs_worker.rb index 98c81956cba..f34ed6c4844 100644 --- a/app/workers/stuck_merge_jobs_worker.rb +++ b/app/workers/stuck_merge_jobs_worker.rb @@ -4,6 +4,10 @@ class StuckMergeJobsWorker include ApplicationWorker include CronjobQueue + def self.logger + Rails.logger + end + # rubocop: disable CodeReuse/ActiveRecord def perform stuck_merge_requests.find_in_batches(batch_size: 100) do |group| @@ -35,7 +39,7 @@ class StuckMergeJobsWorker # We rely on state machine callbacks to update head_pipeline_id merge_requests_to_reopen.each(&:unlock_mr) - Rails.logger.info("Updated state of locked merge jobs. JIDs: #{completed_jids.join(', ')}") + self.class.logger.info("Updated state of locked merge jobs. JIDs: #{completed_jids.join(', ')}") end # rubocop: enable CodeReuse/ActiveRecord |