FIX: stop forking regular backup jobs

This commit is contained in:
Sam 2017-12-21 09:00:23 +11:00
parent 744bb72cf9
commit 88a4ec5f1b
2 changed files with 6 additions and 2 deletions

View File

@ -5,7 +5,7 @@ module Jobs
sidekiq_options retry: false
def execute(args)
BackupRestore.backup!(Discourse.system_user.id, publish_to_message_bus: false, with_uploads: SiteSetting.backup_with_uploads)
BackupRestore.backup!(Discourse.system_user.id, publish_to_message_bus: false, with_uploads: SiteSetting.backup_with_uploads, fork: false)
end
end
end

View File

@ -12,7 +12,11 @@ module BackupRestore
LOGS_CHANNEL = "/admin/backups/logs"
def self.backup!(user_id, opts = {})
start! BackupRestore::Backuper.new(user_id, opts)
if opts[:fork] == false
BackupRestore::Backuper.new(user_id, opts).run
else
start! BackupRestore::Backuper.new(user_id, opts)
end
end
def self.restore!(user_id, opts = {})