Skip to content

Commit

Permalink
fix(backup): missing pid
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed Jan 14, 2025
1 parent aef17c1 commit 02ce98e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/zealot/backup/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def dump

exit_message = []
success = [compress_pid, dump_pid].all? do |pid|
next if pid.blank?

_, exitstatus = Process.waitpid2(pid)
prefix_message = compress_pid == pid ? 'compress' : 'dump'
message = "#{prefix_message} #{exitstatus.to_s}"
Expand Down Expand Up @@ -96,6 +98,8 @@ def restore

exit_message = []
success = [decompress_pid, restore_pid].all? do |pid|
next if pid.blank?

_, exitstatus = Process.waitpid2(pid)
prefix_message = decompress_pid == pid ? 'decompress' : 'restore'
message = "#{prefix_message} #{exitstatus.to_s}"
Expand Down

0 comments on commit 02ce98e

Please sign in to comment.