about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authortakayamaki <fsgiko@gmail.com>2017-06-04 07:11:15 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-06-04 00:11:15 +0200
commit3eedad27375721aaaa6e8397124989e4ead771a9 (patch)
tree08d44ddfd6c217b9311efad92daf55328568cc82 /app/controllers
parentce7c0def88b4f9ee97913002fb2d41d1832bd8af (diff)
change sidekiq queueing to bulk push (#3536)
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/settings/follower_domains_controller.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/settings/follower_domains_controller.rb b/app/controllers/settings/follower_domains_controller.rb
index 13722345f..90b48887f 100644
--- a/app/controllers/settings/follower_domains_controller.rb
+++ b/app/controllers/settings/follower_domains_controller.rb
@@ -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)