Comments (2)
Based on your example, it might be the difference between using a string vs a symbol?
from feature.
Do you use 'Feature-toggle caching' with a number as a second argument?
Feature.set_repository(your_repository, 60)
If yes, it could happen because #run_with_activated
doesn't flush @next_refresh_after
:
def self.run_with_activated(*features, &blk)
with_stashed_config do
@active_features.concat(features).uniq!
@auto_refresh = false
@perform_initial_refresh = false
blk.call
end
end
And #active_features
refreshes features from a repo:
def self.active_features
raise 'missing Repository for obtaining feature lists' unless @repository
refresh! if @auto_refresh || @perform_initial_refresh || (@next_refresh_after && Time.now > @next_refresh_after)
@active_features
end
def self.refresh!
@active_features = @repository.active_features
@next_refresh_after = Time.now + @refresh_after if @refresh_after
@perform_initial_refresh = false
end
There is another condition for a bug to be reproduced:
- specs should be executed for more than
@refresh_time
- or spring should be started before (Time.now - @refresh_time).
Both easily happen if @refresh_time
is pretty small.
from feature.
Related Issues (14)
- `next_migration_number': NotImplementedError HOT 1
- The generator is not compatible with Rails 4
- Allow YamlRepository.new() to accept a hash? HOT 3
- Add auto_refresh HOT 2
- Lazy refresh instead of refresh on set_repository HOT 3
- ActiveRecord::ConnectionNotEstablished HOT 3
- Ability to access a list of all features HOT 1
- Push new version to rubygems HOT 1
- Setup Library for Rails / ActiveRecord integration HOT 1
- Uninitialized constant error raised in Rails 4 HOT 3
- Can I use it to wrap alternative method implementations? HOT 3
- Create a repository that uses environment variables HOT 4
- Pipe Fail Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feature.