Remove legacy vote post action code. (#6009)

This commit is contained in:
Guo Xiang Tan
2018-07-09 16:54:18 +08:00
committed by GitHub
parent d9a9682f72
commit 96aca6d7e6
17 changed files with 114 additions and 87 deletions

View File

@ -1,8 +1,9 @@
module Migration
class BaseDropper
def initialize(after_migration, delay, on_drop)
def initialize(after_migration, delay, on_drop, after_drop)
@after_migration = after_migration
@on_drop = on_drop
@after_drop = after_drop
# in production we need some extra delay to allow for slow migrations
@delay = delay || (Rails.env.production? ? 3600 : 0)
@ -12,6 +13,7 @@ module Migration
if droppable?
@on_drop&.call
execute_drop!
@after_drop&.call
Discourse.reset_active_record_cache
end