resque-history 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +6 -18
- data/Gemfile.lock +1 -1
- data/README.md +20 -0
- data/VERSION +1 -1
- data/lib/resque-history/plugins/history.rb +1 -1
- data/resque-history.gemspec +2 -2
- data/spec/resque-history/plugins/history_spec.rb +15 -0
- metadata +2 -2
data/Changelog.md
CHANGED
@@ -1,26 +1,14 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
-
###
|
4
|
+
### 1.6.0 (April 16, 2012)
|
5
5
|
|
6
|
-
|
7
|
-
* bug fix for the gem work with resque-restriction gem, and other which re-implements job reserve method
|
8
|
-
* changing the require for load resque-web integration to
|
6
|
+
Bug fixes
|
9
7
|
|
10
|
-
|
11
|
-
require 'resque-pause/server'
|
12
|
-
```
|
8
|
+
- updated readme and fixed typo in maximum history size variable (@fred #1)
|
13
9
|
|
14
|
-
|
10
|
+
## 1.6.0 (April 16, 2012)
|
15
11
|
|
16
|
-
|
17
|
-
* improvement on resque-web integration urls
|
12
|
+
Features:
|
18
13
|
|
19
|
-
|
20
|
-
|
21
|
-
* updating documentation
|
22
|
-
* generating a good package for rubygems
|
23
|
-
|
24
|
-
### 0.0.1
|
25
|
-
|
26
|
-
* version was removed from rubygems, bad package
|
14
|
+
- Added simple pagination
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -26,6 +26,26 @@ Usage / Examples
|
|
26
26
|
end
|
27
27
|
```
|
28
28
|
|
29
|
+
|
30
|
+
### Job History
|
31
|
+
|
32
|
+
By default resque-history stores 500 history items on redis,
|
33
|
+
but if you want to store less items, assign @max_history in the job class.
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
require 'resque-history'
|
37
|
+
|
38
|
+
class UpdateNetworkGraph
|
39
|
+
extend Resque::Plugins::History
|
40
|
+
@queue = :network_graph
|
41
|
+
@max_history = 50 # max number of histories to be kept
|
42
|
+
|
43
|
+
def self.perform(some_id)
|
44
|
+
do_stuff(some_id)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
29
49
|
Resque-Web integration
|
30
50
|
----------------------
|
31
51
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.1
|
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.6.
|
8
|
+
s.version = "1.6.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-04-
|
12
|
+
s.date = "2012-04-17"
|
13
13
|
s.description = "Show history of recently executed jobs"
|
14
14
|
s.email = "ilyakatz@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -9,6 +9,16 @@ class HistoryJob
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
+
class MaxHistoryJob
|
13
|
+
extend Resque::Plugins::History
|
14
|
+
@queue = :test2
|
15
|
+
@max_history = 15
|
16
|
+
|
17
|
+
def self.perform(*args)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
|
12
22
|
describe Resque::Plugins::History do
|
13
23
|
it "should be compliance with Resqu::Plugin document" do
|
14
24
|
expect { Resque::Plugin.lint(Resque::Plugins::History) }.to_not raise_error
|
@@ -28,6 +38,11 @@ describe Resque::Plugins::History do
|
|
28
38
|
end
|
29
39
|
end
|
30
40
|
|
41
|
+
it "should use the max_history size of the history list" do
|
42
|
+
MaxHistoryJob.maximum_history_size.should == 15
|
43
|
+
end
|
44
|
+
|
45
|
+
|
31
46
|
it "should set the default size of the history list to be 500" do
|
32
47
|
HistoryJob.maximum_history_size.should == 500
|
33
48
|
end
|
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.6.
|
4
|
+
version: 1.6.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-04-
|
12
|
+
date: 2012-04-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: resque-history
|