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

Add ActorLimit adapter #847

Merged
merged 3 commits into from
Mar 15, 2024
Merged

Add ActorLimit adapter #847

merged 3 commits into from
Mar 15, 2024

Conversation

bkeepers
Copy link
Collaborator

This adds the ActorLimit adapter and configures it to be used by default.

101.times { |i| Flipper.enable :some_feature Flipper::Actor.new(i) }
# Error: Actor limit of 100 exceeded for feature some_feature

100 has been our recommended max for individual actors for a while, so I started with that default. It can easily be configured with:

Rails.application.configure do |config|
  config.flipper.actor_limit = 1000
  
  # or disable
  config.flipper.actor_limit = false
end

Copy link
Collaborator

@jnunemaker jnunemaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

ref #837

lib/flipper/engine.rb Show resolved Hide resolved
lib/flipper/engine.rb Show resolved Hide resolved
lib/flipper/adapters/actor_limit.rb Outdated Show resolved Hide resolved
Base automatically changed from chance-the-wrapper to main February 18, 2024 20:01
@bkeepers bkeepers merged commit 60377d2 into main Mar 15, 2024
72 checks passed
@bkeepers bkeepers deleted the actor-limit branch March 15, 2024 13:15
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.

2 participants