lib/mneme.rb in mneme-0.5.1 vs lib/mneme.rb in mneme-0.5.2
- old
+ new
@@ -73,25 +73,23 @@
private
def filter(n)
period = epoch_name(config['namespace'], n, config['length'])
- filter = if env.key? period
- env[period]
+ filter = if env[Goliath::Constants::CONFIG].key? period
+ env[Goliath::Constants::CONFIG][period]
else
opts = {
namespace: config['namespace'],
size: config['size'] * config['bits'],
seed: config['seed'],
hashes: config['hashes']
}
- # env[period] = EventMachine::Synchrony::ConnectionPool.new(size: 10) do
- env[period] = BloomFilter::Redis.new(opts)
- # end
-
- env[period]
+ env[Goliath::Constants::CONFIG][period] = EventMachine::Synchrony::ConnectionPool.new(size: 1) do
+ BloomFilter::Redis.new(opts)
+ end
end
filter
end
-end
\ No newline at end of file
+end