mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 16:29:32 +08:00
DEV: Allow rebakes to generate optimized images at the same time
Previously only Sidekiq was allowed to generate more than one optimized image at the same time per machine. This adds an easy mechanism to allow the same in rake tasks and other tools.
This commit is contained in:

committed by
Gerhard Schlager

parent
bcb8b3fab9
commit
241bf48497
@ -13,6 +13,9 @@ task "posts:rebake_uncooked_posts" => :environment do
|
||||
# this rake task without worrying about your sidekiq imploding
|
||||
Jobs.run_immediately!
|
||||
|
||||
# don't lock per machine, we want to be able to run this from multiple consoles
|
||||
OptimizedImage.lock_per_machine = false
|
||||
|
||||
ENV["RAILS_DB"] ? rebake_uncooked_posts : rebake_uncooked_posts_all_sites
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user