Always catch StandardError in Threads and release connection

This commit is contained in:
Sebastian Serth
2022-11-11 22:50:27 +01:00
parent b838a41f16
commit 2753e4ef5b
4 changed files with 10 additions and 0 deletions

View File

@ -312,6 +312,8 @@ class Submission < ApplicationRecord
rfc.full_score_reached = true
rfc.save
end
rescue StandardError => e
Sentry.capture_exception(e)
ensure
ActiveRecord::Base.connection_pool.release_connection
end