[deploy] Bug Fix:Run Hypershield Refresh AFTER db:prepare (#9546)

This commit is contained in:
Molly Struve 2020-07-27 17:30:02 -05:00 committed by GitHub
parent f9137b2abd
commit 34458d5de9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,5 +15,10 @@ namespace :app_initializer do
end
if ENV["ENABLE_HYPERSHIELD"].present?
Rake::Task["db:prepare"].enhance(["hypershield:refresh"])
# enhance must be passed a block here to ensure that our hypershield task
# runs AFTER db:prepare. Passing it as an argument will cause it to run BEFORE
# https://ruby-doc.org/stdlib-2.0.0/libdoc/rake/rdoc/Rake/Task.html#method-i-enhance
Rake::Task["db:prepare"].enhance do
Rake::Task["hypershield:refresh"]
end
end