mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: stop forking regular backup jobs
This commit is contained in:
parent
744bb72cf9
commit
88a4ec5f1b
@ -5,7 +5,7 @@ module Jobs
|
|||||||
sidekiq_options retry: false
|
sidekiq_options retry: false
|
||||||
|
|
||||||
def execute(args)
|
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
|
end
|
||||||
end
|
end
|
||||||
|
@ -12,8 +12,12 @@ module BackupRestore
|
|||||||
LOGS_CHANNEL = "/admin/backups/logs"
|
LOGS_CHANNEL = "/admin/backups/logs"
|
||||||
|
|
||||||
def self.backup!(user_id, opts = {})
|
def self.backup!(user_id, opts = {})
|
||||||
|
if opts[:fork] == false
|
||||||
|
BackupRestore::Backuper.new(user_id, opts).run
|
||||||
|
else
|
||||||
start! BackupRestore::Backuper.new(user_id, opts)
|
start! BackupRestore::Backuper.new(user_id, opts)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.restore!(user_id, opts = {})
|
def self.restore!(user_id, opts = {})
|
||||||
start! BackupRestore::Restorer.new(user_id, opts)
|
start! BackupRestore::Restorer.new(user_id, opts)
|
||||||
|
Loading…
Reference in New Issue
Block a user