summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-26 14:15:51 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-26 16:07:08 +0200
commit4b998239a3fec56f93e24ca063d1196416aec938 (patch)
tree0f8b36ec2bfd9436a19f3487e36dc68e9ea3fbc5 /lib
parent3337130e015fba1d04a53e8e3a7098f966792f5f (diff)
downloadgitlab-ce-4b998239a3fec56f93e24ca063d1196416aec938.tar.gz
Add plugin queue to sidekiq config [ci skip]
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/plugin.rb6
-rw-r--r--lib/tasks/plugins.rake5
2 files changed, 8 insertions, 3 deletions
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