-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
database_role
option to scope checks for replicas (#57)
* Add `database_role` option to scope checks for replicas It can be useful to confirm that certain database queries are being made against a primary database or a replica database. This change adds a new option `database_role`, which makes the query counter only count queries that were made against a database with the specified role. We've used this logic at CommonLit for several years to ensure we're querying the right database. This works in test environments even if your primary and replica database configurations point at the same database. * remove explicit sqlite declaration * allow rails 7.1.0 * add Rails 7.1.0 to CI Build --------- Co-authored-by: Jonathan Rochkind <[email protected]>
- Loading branch information
1 parent
5fa15be
commit 13a3283
Showing
6 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,5 @@ | |
source "https://rubygems.org" | ||
|
||
gem "activesupport", "~> 6.1.0" | ||
gem "sqlite3", "~> 1.4" | ||
|
||
gemspec path: "../" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,5 @@ | |
source "https://rubygems.org" | ||
|
||
gem "activesupport", "~> 7.0.0" | ||
gem "sqlite3", "~> 1.4" | ||
|
||
gemspec path: "../" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters