FEATURE: Trigger an event after a backup restore
This commit is contained in:
parent
50f833def0
commit
99ad61afb7
|
@ -81,6 +81,8 @@ module BackupRestore
|
|||
clear_theme_cache
|
||||
|
||||
extract_uploads
|
||||
|
||||
after_restore_hook
|
||||
rescue SystemExit
|
||||
log "Restore process was cancelled!"
|
||||
rollback
|
||||
|
@ -531,6 +533,11 @@ module BackupRestore
|
|||
FileUtils.mkdir_p(directory)
|
||||
end
|
||||
|
||||
def after_restore_hook
|
||||
log "Executing the after_restore_hook..."
|
||||
DiscourseEvent.trigger(:restore_complete)
|
||||
end
|
||||
|
||||
def log(message, ex = nil)
|
||||
timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
||||
puts(message)
|
||||
|
|
Loading…
Reference in New Issue