FIX: Ensure multisite DB is set correctly when spawning backup process
Followup to 76477a1c8b
This commit is contained in:
parent
c664ba8fa8
commit
fe932eb644
|
@ -174,7 +174,7 @@ module BackupRestore
|
||||||
script = File.join(Rails.root, "script", "spawn_backup_restore.rb")
|
script = File.join(Rails.root, "script", "spawn_backup_restore.rb")
|
||||||
command = ["bundle", "exec", "ruby", script, type, user_id, opts.to_json].shelljoin
|
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)
|
Process.detach(pid)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue