mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Combine rake tasks to save time
The log:clear task seems to take quite a bit of time. At least we can speed up a bit by only booting up Rails once. I'm more likely to run the script if it's quick ;)
This commit is contained in:
@@ -27,11 +27,8 @@ FileUtils.chdir APP_ROOT do
|
||||
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
|
||||
# end
|
||||
|
||||
puts "\n== Preparing database =="
|
||||
system! "bin/rails db:prepare"
|
||||
|
||||
puts "\n== Removing old logs and tempfiles =="
|
||||
system! "bin/rails log:clear tmp:clear"
|
||||
puts "\n== Preparing database, removing old logs and tempfiles =="
|
||||
system! "bin/rails db:prepare log:clear tmp:clear"
|
||||
|
||||
puts "\n== Restarting application server =="
|
||||
# system! "bin/rails restart"
|
||||
|
||||
Reference in New Issue
Block a user