DEV: Add skip seed flag (#10116)

* add a flag to skip seed

* only seed when running post deployment migrations
This commit is contained in:
Blake Erickson 2020-06-25 10:14:58 -06:00 committed by GitHub
parent 855d423791
commit 01b6349a67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,11 +157,13 @@ task 'multisite:migrate' => ['db:load_config', 'environment', 'set_locale'] do |
SeedFu.seed(seed_paths, /001_refresh/)
execute_concurently(concurrency, exceptions) do |db|
puts "Seeding #{db}"
SeedFu.seed(seed_paths)
if !Discourse.skip_post_deployment_migrations? && ENV['SKIP_OPTIMIZE_ICONS'] != '1'
SiteIconManager.ensure_optimized!
if ENV['SKIP_SEED'] != '1'
puts "Seeding #{db}"
SeedFu.seed(seed_paths)
end
end
end