mneme 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/lib/mneme.rb +2 -2
- data/lib/mneme/sweeper.rb +11 -9
- data/mneme.gemspec +1 -1
- metadata +2 -2
data/Gemfile
CHANGED
data/lib/mneme.rb
CHANGED
data/lib/mneme/sweeper.rb
CHANGED
@@ -16,17 +16,19 @@ module Mnemosyne
|
|
16
16
|
end
|
17
17
|
|
18
18
|
sweeper = Proc.new do
|
19
|
-
|
20
|
-
|
19
|
+
Fiber.new do
|
20
|
+
current = epoch_name(@config['namespace'], 0, @config['length'])
|
21
|
+
@logger.info "Sweeping old filters, current epoch: #{current}"
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
conn = Redis.new
|
24
|
+
@config['periods'].times do |n|
|
25
|
+
name = epoch_name(@config['namespace'], n + @config['periods'], @config['length'])
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
conn.del(name)
|
28
|
+
@logger.info "Removed: #{name}"
|
29
|
+
end
|
30
|
+
conn.client.disconnect
|
31
|
+
end.resume
|
30
32
|
end
|
31
33
|
|
32
34
|
sweeper.call
|
data/mneme.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: mneme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ilya Grigorik
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-29 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|