diff options
-rw-r--r-- | config/sidekiq_queues.yml | 1 | ||||
-rw-r--r-- | lib/gitlab/plugin.rb | 6 | ||||
-rw-r--r-- | lib/tasks/plugins.rake | 5 |
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 |