Closed chasestubblefield closed 6 years ago
@gburgett Addressed your concerns about Query
and added a test that uses threads, would appreciate your feedback. CI failures seem to be caused by latest Rubocop version.
1 Warning | |
---|---|
:warning: | No issue referenced - please create an issue describing a single unit of work and reference it using “closes #[the issue number]” |
Generated by :no_entry_sign: Danger
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
spec/support/fixtures_helper.rb | 7 | 46.15% | ||
<!-- | Total: | 7 | --> |
Totals | |
---|---|
Change from base Build 429: | -2.0% |
Covered Lines: | 526 |
Relevant Lines: | 563 |
This allows PostgresStore to be used in a threaded environment like with the puma web server.
An optional Hash with pool options can now passed when configuring the store:
The default is the same as the connection_pool gem,
{size: 5, timeout: 5}
.Also, the connection pool is available through
PostgresStore#connection_pool
to allow clearing active connections before forking, useful with puma or unicorn.I think this is a cleaner approach than #69.