resque-cleaner 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/lib/resque_cleaner.rb +1 -1
- data/test/resque_cleaner_test.rb +6 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/lib/resque_cleaner.rb
CHANGED
data/test/resque_cleaner_test.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper'
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/test_helper')
|
2
2
|
require 'time'
|
3
3
|
context "ResqueCleaner" do
|
4
4
|
def create_and_process_jobs(queue,worker,num,date,job,*args)
|
@@ -137,6 +137,11 @@ context "ResqueCleaner" do
|
|
137
137
|
# combination 2
|
138
138
|
ret = @cleaner.select {|j| j['payload']['args']==['Jason'] && j.queue?(:jobs2)}
|
139
139
|
assert_equal 13, ret.size
|
140
|
+
|
141
|
+
# retried?
|
142
|
+
requeued = @cleaner.requeue{|j| j["payload"]["args"][0]=="Johnson"}
|
143
|
+
ret = @cleaner.select {|j| j.retried?}
|
144
|
+
assert_equal 1, ret.size
|
140
145
|
end
|
141
146
|
|
142
147
|
test "#stats_by_date returns stats grouped by date" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-cleaner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tatsuya Ono
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-12-30 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|