Skip to content

Added PgpoolNoLoadBalance.force to allow enabling pgpool_nlb inside blocks#5

Open
bruno-campos wants to merge 1 commit intoelengine:masterfrom
CareMessagePlatform:bc_force_block
Open

Added PgpoolNoLoadBalance.force to allow enabling pgpool_nlb inside blocks#5
bruno-campos wants to merge 1 commit intoelengine:masterfrom
CareMessagePlatform:bc_force_block

Conversation

@bruno-campos
Copy link

@bruno-campos bruno-campos commented Mar 2, 2026

PgpoolNoLoadBalance.force do
  User.all
  # ... 
end

Will allow enabling pgpool_nlb inside blocks, so all queries will run with it enabled. This is useful to set around_action on specific controllers or sidekiq middlewares, for example, so that all queries will run through primary in that context.

@bruno-campos bruno-campos force-pushed the bc_force_block branch 2 times, most recently from 664209a to 05fb6cc Compare March 3, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant