resque-cleaner 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
@@ -99,6 +99,8 @@ module ResqueCleaner
|
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
102
|
+
mime_type :json, 'application/json'
|
103
|
+
|
102
104
|
get "/cleaner" do
|
103
105
|
load_library
|
104
106
|
load_cleaner_filter
|
@@ -131,7 +133,8 @@ module ResqueCleaner
|
|
131
133
|
|
132
134
|
@failed = cleaner.select(&block).reverse
|
133
135
|
|
134
|
-
url = "cleaner_list?c=#{@klass}&ex=#{@exception}f=#{@from}&t=#{@to}"
|
136
|
+
url = "cleaner_list?c=#{@klass}&ex=#{@exception}&f=#{@from}&t=#{@to}"
|
137
|
+
@dump_url = "cleaner_dump?c=#{@klass}&ex=#{@exception}&f=#{@from}&t=#{@to}"
|
135
138
|
@paginate = Paginate.new(@failed, url, params[:p].to_i)
|
136
139
|
|
137
140
|
@klasses = cleaner.stats_by_class.keys
|
@@ -163,6 +166,16 @@ module ResqueCleaner
|
|
163
166
|
erb File.read(ResqueCleaner::Server.erb_path('cleaner_exec.erb'))
|
164
167
|
end
|
165
168
|
|
169
|
+
get "/cleaner_dump" do
|
170
|
+
load_library
|
171
|
+
load_cleaner_filter
|
172
|
+
|
173
|
+
block = filter_block
|
174
|
+
|
175
|
+
content_type :json
|
176
|
+
JSON.pretty_generate(cleaner.select(&block))
|
177
|
+
end
|
178
|
+
|
166
179
|
post "/cleaner_stale" do
|
167
180
|
load_library
|
168
181
|
cleaner.clear_stale
|
data/test/resque_web_test.rb
CHANGED
@@ -42,5 +42,9 @@ context "resque-web" do
|
|
42
42
|
post "/cleaner_exec", :action => "clear", :sha1 => Digest::SHA1.hexdigest(@cleaner.select[0].to_json)
|
43
43
|
assert_equal 9, @cleaner.select.size
|
44
44
|
end
|
45
|
+
test "#cleaner_dump should respond with success" do
|
46
|
+
get "/cleaner_dump"
|
47
|
+
assert last_response.ok?, last_response.errors
|
48
|
+
end
|
45
49
|
end
|
46
50
|
|
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: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
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: 2011-
|
18
|
+
date: 2011-05-05 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|