mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
FIX: serialize post processing
This avoids all sorts of nasty race conditions in job schedular
This commit is contained in:
@ -16,11 +16,13 @@ class CookedPostProcessor
|
||||
end
|
||||
|
||||
def post_process(bypass_bump = false)
|
||||
keep_reverse_index_up_to_date
|
||||
post_process_images
|
||||
post_process_oneboxes
|
||||
optimize_urls
|
||||
pull_hotlinked_images(bypass_bump)
|
||||
DistributedMutex.synchronize("post_process_#{@post.id}") do
|
||||
keep_reverse_index_up_to_date
|
||||
post_process_images
|
||||
post_process_oneboxes
|
||||
optimize_urls
|
||||
pull_hotlinked_images(bypass_bump)
|
||||
end
|
||||
end
|
||||
|
||||
def keep_reverse_index_up_to_date
|
||||
|
Reference in New Issue
Block a user