Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start @reaper.run after connection pool initialized #30183

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,6 @@ def initialize(spec)
@spec = spec

@checkout_timeout = (spec.config[:checkout_timeout] && spec.config[:checkout_timeout].to_f) || 5
@reaper = Reaper.new(self, (spec.config[:reaping_frequency] && spec.config[:reaping_frequency].to_f))
@reaper.run

# default max pool size to 5
@size = (spec.config[:pool] && spec.config[:pool].to_i) || 5
Expand Down Expand Up @@ -357,6 +355,9 @@ def initialize(spec)
@available = ConnectionLeasingQueue.new self

@lock_thread = false

@reaper = Reaper.new(self, spec.config[:reaping_frequency] && spec.config[:reaping_frequency].to_f)
@reaper.run
end

def lock_thread=(lock_thread)
Expand Down