From 4b998239a3fec56f93e24ca063d1196416aec938 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 26 Feb 2018 14:15:51 +0200 Subject: Add plugin queue to sidekiq config [ci skip] Signed-off-by: Dmitriy Zaporozhets --- lib/gitlab/plugin.rb | 6 +++--- lib/tasks/plugins.rake | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/gitlab/plugin.rb b/lib/gitlab/plugin.rb index 5339c4dbbc8..3e82f5cb0d8 100644 --- a/lib/gitlab/plugin.rb +++ b/lib/gitlab/plugin.rb @@ -7,9 +7,9 @@ module Gitlab end def self.execute_all_async(data) - files.each do |file| - PluginWorker.perform_async(file, data) - end + args = files.map { |file| [file, data] } + + PluginWorker.bulk_perform_async(args) end def self.execute(file, data) diff --git a/lib/tasks/plugins.rake b/lib/tasks/plugins.rake index f4d7edb2eb2..11c41f13614 100644 --- a/lib/tasks/plugins.rake +++ b/lib/tasks/plugins.rake @@ -13,4 +13,9 @@ namespace :plugins do end end end + + desc 'Validate existing plugins' + task validate_async: :environment do + Gitlab::Plugin.execute_all_async(Gitlab::DataBuilder::Push::SAMPLE_DATA) + end end -- cgit v1.2.1