FIX: Pass local scope variable to inner function

This commit is contained in:
Dan Ungureanu 2020-06-22 19:23:59 +03:00
parent 68f767a557
commit 2e1efbde52
No known key found for this signature in database
GPG Key ID: 0AA2A00D6ACC8B84

View File

@ -114,7 +114,7 @@ task 'multisite:migrate' => ['db:load_config', 'environment', 'set_locale'] do |
SeedFu.quiet = true
def execute_concurently(concurrency)
def execute_concurently(concurrency, exceptions)
queue = Queue.new
RailsMultisite::ConnectionManagement.each_connection do |db|
@ -148,7 +148,7 @@ task 'multisite:migrate' => ['db:load_config', 'environment', 'set_locale'] do |
end.each(&:join)
end
execute_concurently(concurrency) do |db|
execute_concurently(concurrency, exceptions) do |db|
puts "Migrating #{db}"
ActiveRecord::Tasks::DatabaseTasks.migrate
@ -160,7 +160,7 @@ task 'multisite:migrate' => ['db:load_config', 'environment', 'set_locale'] do |
seed_paths = DiscoursePluginRegistry.seed_paths
SeedFu.seed(seed_paths, /001_refresh/)
execute_concurently(concurrency) do |db|
execute_concurently(concurrency, exceptions) do |db|
puts "Seeding #{db}"
SeedFu.seed(seed_paths)
end