Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-26 15:15:51 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-26 17:07:08 +0300
commit4b998239a3fec56f93e24ca063d1196416aec938 (patch)
tree0f8b36ec2bfd9436a19f3487e36dc68e9ea3fbc5
parent3337130e015fba1d04a53e8e3a7098f966792f5f (diff)
Add plugin queue to sidekiq config [ci skip]
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--config/sidekiq_queues.yml1
-rw-r--r--lib/gitlab/plugin.rb6
-rw-r--r--lib/tasks/plugins.rake5
3 files changed, 9 insertions, 3 deletions
diff --git a/config/sidekiq_queues.yml b/config/sidekiq_queues.yml
index f037e3d1221..4845dc28a4a 100644
--- a/config/sidekiq_queues.yml
+++ b/config/sidekiq_queues.yml
@@ -68,3 +68,4 @@
- [project_migrate_hashed_storage, 1]
- [storage_migrator, 1]
- [pages_domain_verification, 1]
+ - [plugin, 1]
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