Skip to content
Snippets Groups Projects
Commit 0cb361fe authored by Bob Van Landuyt :neckbeard:'s avatar Bob Van Landuyt :neckbeard: :sunglasses:
Browse files

Merge branch 'dm-queue-mirror-jobs-in-batches-drain-ce' into 'master'

Add queue_size method to ApplicationWorker

See merge request gitlab-org/gitlab-ce!30416
parents 2cbc72d9 840e6fdb
No related branches found
No related tags found
No related merge requests found
# frozen_string_literal: true
 
require 'sidekiq/api'
Sidekiq::Worker.extend ActiveSupport::Concern
 
module ApplicationWorker
Loading
Loading
@@ -44,6 +46,10 @@ module ApplicationWorker
get_sidekiq_options['queue'].to_s
end
 
def queue_size
Sidekiq::Queue.new(queue).size
end
def bulk_perform_async(args_list)
Sidekiq::Client.push_bulk('class' => self, 'args' => args_list)
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment