resque-history 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/Changelog.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -4
- data/VERSION +1 -1
- data/lib/resque-history/plugins/history.rb +8 -8
- data/lib/resque-history/server/views/history.erb +5 -5
- data/resque-history.gemspec +3 -3
- metadata +6 -3
data/.travis.yml
CHANGED
data/Changelog.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -49,11 +49,10 @@ but if you want to store less items, assign @max_history in the job class.
|
|
49
49
|
Resque-Web integration
|
50
50
|
----------------------
|
51
51
|
|
52
|
-
|
52
|
+
'History' tab in resque web GUI
|
53
|
+
|
54
|
+
![Resque History GUI](https://img.skitch.com/20120510-x4egbeih39bb2xe82c2mtapmp9.jpg)
|
53
55
|
|
54
|
-
```ruby
|
55
|
-
require 'resque-history/server'
|
56
|
-
```
|
57
56
|
|
58
57
|
Install
|
59
58
|
=======
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.9.
|
1
|
+
1.9.1
|
@@ -10,10 +10,10 @@ module Resque
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def on_failure_history(exception, *args)
|
13
|
-
Resque.redis.lpush(HISTORY_SET_NAME, {
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
Resque.redis.lpush(HISTORY_SET_NAME, {:class => "#{self}",
|
14
|
+
:time => Time.now.strftime("%Y-%m-%d %H:%M"),
|
15
|
+
:args => args,
|
16
|
+
:error => exception.message
|
17
17
|
}.to_json)
|
18
18
|
|
19
19
|
if Resque.redis.llen(HISTORY_SET_NAME) > maximum_history_size
|
@@ -29,10 +29,10 @@ module Resque
|
|
29
29
|
|
30
30
|
def after_perform_history(*args)
|
31
31
|
elapsed_seconds = (Time.now - @start_time).to_i
|
32
|
-
Resque.redis.lpush(HISTORY_SET_NAME, {
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
Resque.redis.lpush(HISTORY_SET_NAME, {:class => "#{self}",
|
33
|
+
:args => args,
|
34
|
+
:time => Time.now.strftime("%Y-%m-%d %H:%M"),
|
35
|
+
:execution =>elapsed_seconds
|
36
36
|
}.to_json)
|
37
37
|
|
38
38
|
if Resque.redis.llen(HISTORY_SET_NAME) > maximum_history_size
|
@@ -22,12 +22,12 @@
|
|
22
22
|
<th>Execution</th>
|
23
23
|
</tr>
|
24
24
|
<% history.each do |history| %>
|
25
|
-
<% j = JSON.parse(history) %>
|
25
|
+
<% j = JSON.parse(history, :symbolize_keys => true) %>
|
26
26
|
<tr class='<%= j["error"].nil? ? "" : "failure" %>' >
|
27
|
-
<td class='queue'><%= j[
|
28
|
-
<td class='args'><%= j[
|
29
|
-
<td class='args'><%= j[
|
30
|
-
<td class='args'><%= format_execution(j[
|
27
|
+
<td class='queue'><%= j[:class] %></td>
|
28
|
+
<td class='args'><%= j[:args] %></td>
|
29
|
+
<td class='args'><%= j[:time] %></td>
|
30
|
+
<td class='args'><%= format_execution(j[:execution]) %></td>
|
31
31
|
</tr>
|
32
32
|
<% end %>
|
33
33
|
</table>
|
data/resque-history.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "resque-history"
|
8
|
-
s.version = "1.9.
|
8
|
+
s.version = "1.9.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Katzmopolitan"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-07-09"
|
13
13
|
s.description = "Show history of recently executed jobs"
|
14
14
|
s.email = "ilyakatz@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -49,7 +49,7 @@ Gem::Specification.new do |s|
|
|
49
49
|
]
|
50
50
|
s.homepage = "https://github.com/ilyakatz/resque-history"
|
51
51
|
s.require_paths = ["lib"]
|
52
|
-
s.rubygems_version = "1.8.
|
52
|
+
s.rubygems_version = "1.8.24"
|
53
53
|
s.summary = "Show history of recently executed jobs"
|
54
54
|
|
55
55
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-history
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: resque-history
|
@@ -172,6 +172,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
172
|
- - ! '>='
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
|
+
segments:
|
176
|
+
- 0
|
177
|
+
hash: 3240563591935182200
|
175
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
179
|
none: false
|
177
180
|
requirements:
|
@@ -180,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
183
|
version: '0'
|
181
184
|
requirements: []
|
182
185
|
rubyforge_project:
|
183
|
-
rubygems_version: 1.8.
|
186
|
+
rubygems_version: 1.8.24
|
184
187
|
signing_key:
|
185
188
|
specification_version: 3
|
186
189
|
summary: Show history of recently executed jobs
|