mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-20 20:42:44 -05:00
13 lines
384 B
Ruby
13 lines
384 B
Ruby
desc "rebuild the user_actions table"
|
|
task "user_actions:rebuild" => :environment do
|
|
o = UserActionObserver.send :new
|
|
MessageBus.off
|
|
UserAction.delete_all
|
|
PostAction.all.each{|i| o.after_save(i)}
|
|
Topic.all.each {|i| o.after_save(i)}
|
|
Post.all.each {|i| o.after_save(i)}
|
|
Notification.all.each {|i| o.after_save(i)}
|
|
# not really needed but who knows
|
|
MessageBus.on
|
|
end
|
|
|