From 7b0fe4aef97c6a5f73a03146b669a415f396799c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 29 Apr 2022 22:43:07 +0200 Subject: Fix opening and closing Redis connections instead of using a pool (#18171) * Fix opening and closing Redis connections instead of using a pool * Fix Redis connections not being returned to the pool in CLI commands --- spec/services/resolve_account_service_spec.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'spec/services') diff --git a/spec/services/resolve_account_service_spec.rb b/spec/services/resolve_account_service_spec.rb index 7b1e8885c..8c302e1d8 100644 --- a/spec/services/resolve_account_service_spec.rb +++ b/spec/services/resolve_account_service_spec.rb @@ -220,6 +220,8 @@ RSpec.describe ResolveAccountService, type: :service do return_values << described_class.new.call('foo@ap.example.com') rescue ActiveRecord::RecordNotUnique fail_occurred = true + ensure + RedisConfiguration.pool.checkin if Thread.current[:redis] end end end -- cgit