Skip to content

Commit

Permalink
Explicitly close RemoteTransfer tempfile
Browse files Browse the repository at this point in the history
Prevents the Tempfile from staying around until garbage collection on
error.
  • Loading branch information
robinkar committed Aug 21, 2024
1 parent 508c2ce commit fb6daa2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/dashboard/app/models/remote_transfer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def perform
errors.add :base, e.message
ensure
self.status = OodCore::Job::Status.new(state: :completed)
tempfile&.close(true)
end

def from
Expand Down

0 comments on commit fb6daa2

Please sign in to comment.