mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 13:53:45 +08:00
PERF: ensure priority for rake rebake tasks is ultra low
Flooding the default queue with lots of jobs is never a good thing. This reduces the risk of sidekiq going into a bad state post rebake
This commit is contained in:
parent
d9413a61d2
commit
a9af77d650
|
@ -111,6 +111,9 @@ def rebake_posts(opts = {})
|
|||
end
|
||||
|
||||
def rebake_post(post, opts = {})
|
||||
if !opts[:priority]
|
||||
opts[:priority] = :ultra_low
|
||||
end
|
||||
post.rebake!(opts)
|
||||
rescue => e
|
||||
puts "", "Failed to rebake (topic_id: #{post.topic_id}, post_id: #{post.id})", e, e.backtrace.join("\n")
|
||||
|
|
Loading…
Reference in New Issue
Block a user