0
0
Fork 0

change sidekiq queueing to bulk push (#3536)

This commit is contained in:
takayamaki 2017-06-04 07:11:15 +09:00 committed by Eugen Rochko
parent ce7c0def88
commit 3eedad2737
6 changed files with 23 additions and 9 deletions

View file

@ -1,5 +1,7 @@
# frozen_string_literal: true
require 'sidekiq-bulk'
class Settings::FollowerDomainsController < ApplicationController
layout 'admin'
@ -13,8 +15,8 @@ class Settings::FollowerDomainsController < ApplicationController
def update
domains = bulk_params[:select] || []
domains.each do |domain|
SoftBlockDomainFollowersWorker.perform_async(current_account.id, domain)
SoftBlockDomainFollowersWorker.push_bulk(domains) do |domain|
[current_account.id, domain]
end
redirect_to settings_follower_domains_path, notice: I18n.t('followers.success', count: domains.size)