mirror of
https://github.com/discourse/discourse.git
synced 2025-04-15 01:10:51 +08:00
Invite admins to automatic backups failure topic.
https://meta.discourse.org/t/if-automatic-backup-fails-there-should-be-a-warning/64461
This commit is contained in:
parent
2fdf9068eb
commit
f6060bfbf6
@ -259,9 +259,15 @@ module BackupRestore
|
||||
log "Notifying '#{@user.username}' of the end of the backup..."
|
||||
status = @success ? :backup_succeeded : :backup_failed
|
||||
|
||||
SystemMessage.create_from_system_user(@user, status,
|
||||
post = SystemMessage.create_from_system_user(@user, status,
|
||||
logs: Discourse::Utils.pretty_logs(@logs)
|
||||
)
|
||||
|
||||
if @user.id == Discourse::SYSTEM_USER_ID
|
||||
post.topic.invite_group(@user, Group[:admins])
|
||||
end
|
||||
|
||||
post
|
||||
end
|
||||
|
||||
def clean_up
|
||||
|
Loading…
x
Reference in New Issue
Block a user