mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Ensure multisite DB is set correctly when spawning backup process
Followup to 76477a1c8b2a51c49b8af878cf3286e9a12ae5fc
This commit is contained in:
@ -174,7 +174,7 @@ module BackupRestore
|
||||
script = File.join(Rails.root, "script", "spawn_backup_restore.rb")
|
||||
command = ["bundle", "exec", "ruby", script, type, user_id, opts.to_json].shelljoin
|
||||
|
||||
pid = spawn(command)
|
||||
pid = spawn({ "RAILS_DB" => RailsMultisite::ConnectionManagement.current_db }, command)
|
||||
Process.detach(pid)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user