mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 04:18:23 +00:00
disable edit notifications when using the rebake rake task
This commit is contained in:
parent
682656fa6c
commit
657ab84825
@ -17,6 +17,9 @@ end
|
|||||||
def rebake_posts(opts = {})
|
def rebake_posts(opts = {})
|
||||||
puts "Rebaking post markdown for '#{RailsMultisite::ConnectionManagement.current_db}'"
|
puts "Rebaking post markdown for '#{RailsMultisite::ConnectionManagement.current_db}'"
|
||||||
|
|
||||||
|
disable_edit_notifications = SiteSetting.disable_edit_notifications
|
||||||
|
SiteSetting.disable_edit_notifications = true
|
||||||
|
|
||||||
total = Post.count
|
total = Post.count
|
||||||
rebaked = 0
|
rebaked = 0
|
||||||
|
|
||||||
@ -25,6 +28,8 @@ def rebake_posts(opts = {})
|
|||||||
print_status(rebaked += 1, total)
|
print_status(rebaked += 1, total)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
SiteSetting.disable_edit_notifications = disable_edit_notifications
|
||||||
|
|
||||||
puts "", "#{rebaked} posts done!", "-" * 50
|
puts "", "#{rebaked} posts done!", "-" * 50
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user