mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
Fix using_connection
This commit is contained in:
parent
a2c22c16cf
commit
fff67e86a0
1 changed files with 5 additions and 3 deletions
|
@ -63,9 +63,11 @@ module DB
|
|||
# when the block ends
|
||||
def using_connection
|
||||
connection = get_from_pool
|
||||
yield connection
|
||||
ensure
|
||||
return_to_pool connection
|
||||
begin
|
||||
yield connection
|
||||
ensure
|
||||
return_to_pool connection
|
||||
end
|
||||
end
|
||||
|
||||
include QueryMethods
|
||||
|
|
Loading…
Reference in a new issue