mirror of
https://github.com/discourse/discourse.git
synced 2025-03-25 05:55:35 +08:00
FIX: ensure we always remove old backups
This commit is contained in:
parent
45ab42dea9
commit
a726f5efea
@ -47,8 +47,6 @@ module BackupRestore
|
|||||||
create_archive
|
create_archive
|
||||||
|
|
||||||
after_create_hook
|
after_create_hook
|
||||||
|
|
||||||
remove_old
|
|
||||||
rescue SystemExit
|
rescue SystemExit
|
||||||
log "Backup process was cancelled!"
|
log "Backup process was cancelled!"
|
||||||
rescue Exception => ex
|
rescue Exception => ex
|
||||||
@ -59,6 +57,7 @@ module BackupRestore
|
|||||||
"#{@archive_basename}.tar.gz"
|
"#{@archive_basename}.tar.gz"
|
||||||
ensure
|
ensure
|
||||||
notify_user rescue nil
|
notify_user rescue nil
|
||||||
|
remove_old rescue nil
|
||||||
clean_up
|
clean_up
|
||||||
@success ? log("[SUCCESS]") : log("[FAILED]")
|
@success ? log("[SUCCESS]") : log("[FAILED]")
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user