resque-loner 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +2 -1
- data/lib/resque-ext/resque.rb +13 -0
- data/lib/resque-loner/helpers.rb +4 -0
- data/lib/resque-loner/version.rb +1 -1
- metadata +16 -8
data/README.markdown
CHANGED
@@ -10,7 +10,7 @@ Installation
|
|
10
10
|
|
11
11
|
First install the gem:
|
12
12
|
|
13
|
-
$ gem install resque-loner
|
13
|
+
$ gem install resque-loner -v=0.1.2
|
14
14
|
|
15
15
|
Then include it in your app:
|
16
16
|
|
@@ -68,6 +68,7 @@ If you want the same type of job in different queues, resque-loner lets you enqu
|
|
68
68
|
>> Resque.enqueue_to :another_queue, CacheSweeper, 1
|
69
69
|
=> "OK"
|
70
70
|
>> Resqueue.dequeue_from :another_queue, CacheSweeper, 1
|
71
|
+
=> 1
|
71
72
|
|
72
73
|
How it works
|
73
74
|
--------
|
data/lib/resque-ext/resque.rb
CHANGED
@@ -21,4 +21,17 @@ module Resque
|
|
21
21
|
Resque::Plugins::Loner::Helpers.loner_queued?(queue, item)
|
22
22
|
end
|
23
23
|
|
24
|
+
def self.remove_queue_with_loner_cleanup(queue)
|
25
|
+
self.remove_queue_without_loner_cleanup(queue)
|
26
|
+
Resque::Plugins::Loner::Helpers.cleanup_loners(queue)
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
class << self
|
31
|
+
|
32
|
+
alias_method :remove_queue_without_loner_cleanup, :remove_queue
|
33
|
+
alias_method :remove_queue, :remove_queue_with_loner_cleanup
|
34
|
+
|
35
|
+
end
|
36
|
+
|
24
37
|
end
|
data/lib/resque-loner/helpers.rb
CHANGED
data/lib/resque-loner/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-loner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jannis Hermanns
|
@@ -14,30 +15,33 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-11-19 00:00:00 +01:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: resque
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
|
-
- -
|
27
|
+
- - ~>
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 15
|
27
30
|
segments:
|
28
31
|
- 1
|
29
|
-
-
|
30
|
-
|
31
|
-
version: 1.9.5
|
32
|
+
- 0
|
33
|
+
version: "1.0"
|
32
34
|
type: :runtime
|
33
35
|
version_requirements: *id001
|
34
36
|
- !ruby/object:Gem::Dependency
|
35
37
|
name: rspec
|
36
38
|
prerelease: false
|
37
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
38
41
|
requirements:
|
39
42
|
- - ">="
|
40
43
|
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
41
45
|
segments:
|
42
46
|
- 0
|
43
47
|
version: "0"
|
@@ -81,23 +85,27 @@ rdoc_options: []
|
|
81
85
|
require_paths:
|
82
86
|
- lib
|
83
87
|
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
84
89
|
requirements:
|
85
90
|
- - ">="
|
86
91
|
- !ruby/object:Gem::Version
|
92
|
+
hash: 3
|
87
93
|
segments:
|
88
94
|
- 0
|
89
95
|
version: "0"
|
90
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
91
98
|
requirements:
|
92
99
|
- - ">="
|
93
100
|
- !ruby/object:Gem::Version
|
101
|
+
hash: 3
|
94
102
|
segments:
|
95
103
|
- 0
|
96
104
|
version: "0"
|
97
105
|
requirements: []
|
98
106
|
|
99
107
|
rubyforge_project: resque-loner
|
100
|
-
rubygems_version: 1.3.
|
108
|
+
rubygems_version: 1.3.7
|
101
109
|
signing_key:
|
102
110
|
specification_version: 3
|
103
111
|
summary: Adds unique jobs to resque
|