extracted pg_dump command into method so it can be patched if necessary

pull/9345/head
Markus Kahl 3 years ago
parent 0126fcf655
commit 038b6f5da2
  1. 6
      app/workers/backup_job.rb

@ -186,13 +186,17 @@ class BackupJob < ::ApplicationJob
end
def dump_database!(path)
_out, err, st = Open3.capture3 pg_env, "pg_dump -x -O -f '#{path}'"
_out, err, st = Open3.capture3 pg_env, dump_command(path)
failure! error: err unless st.success?
st.success?
end
def dump_command(output_file_path)
"pg_dump -x -O -f '#{output_file_path}'"
end
def success!
payload = download_payload(url_helpers.backups_path(target_project))

Loading…
Cancel
Save