resque-remote 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +11 -11
- data/README.md +5 -5
- data/lib/resque-remote/version.rb +1 -1
- data/resque-remote.gemspec +4 -2
- metadata +30 -12
data/Gemfile.lock
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
resque-remote (0.1.
|
5
|
-
resque (
|
4
|
+
resque-remote (0.1.2)
|
5
|
+
resque (< 2.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
10
|
diff-lcs (1.1.3)
|
11
|
-
multi_json (1.
|
12
|
-
rack (1.
|
13
|
-
rack-protection (1.2
|
11
|
+
multi_json (1.7.1)
|
12
|
+
rack (1.5.1)
|
13
|
+
rack-protection (1.3.2)
|
14
14
|
rack
|
15
|
-
redis (3.0.
|
16
|
-
redis-namespace (1.2.
|
15
|
+
redis (3.0.3)
|
16
|
+
redis-namespace (1.2.1)
|
17
17
|
redis (~> 3.0.0)
|
18
|
-
resque (1.
|
18
|
+
resque (1.23.1)
|
19
19
|
multi_json (~> 1.0)
|
20
20
|
redis-namespace (~> 1.0)
|
21
21
|
sinatra (>= 0.9.2)
|
@@ -28,9 +28,9 @@ GEM
|
|
28
28
|
rspec-expectations (2.8.0)
|
29
29
|
diff-lcs (~> 1.1.2)
|
30
30
|
rspec-mocks (2.8.0)
|
31
|
-
sinatra (1.3.
|
32
|
-
rack (~> 1.
|
33
|
-
rack-protection (~> 1.
|
31
|
+
sinatra (1.3.4)
|
32
|
+
rack (~> 1.4)
|
33
|
+
rack-protection (~> 1.3)
|
34
34
|
tilt (~> 1.3, >= 1.3.3)
|
35
35
|
tilt (1.3.3)
|
36
36
|
vegas (0.1.11)
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ Resque Remote's simple goal is to allow you to add a job to a queue with a strin
|
|
6
6
|
|
7
7
|
# Installation
|
8
8
|
|
9
|
-
**
|
9
|
+
**NOTE: Resque-remote is compatible with Resque 1.x but unnececssary for >= 2.x. If you are using Resque 2.x, use the standard API method Resque.push instead.**
|
10
10
|
|
11
11
|
Install the gem ad-hoc:
|
12
12
|
|
@@ -16,7 +16,7 @@ Install the gem ad-hoc:
|
|
16
16
|
Or, add it to your Bundler `Gemfile`:
|
17
17
|
|
18
18
|
# Gemfile
|
19
|
-
gem 'resque', '
|
19
|
+
gem 'resque', '< 2.0'
|
20
20
|
gem 'resque-remote'
|
21
21
|
|
22
22
|
And then run a `bundle install`.
|
@@ -33,11 +33,11 @@ If you're using bundler, just setup your gemset normally.
|
|
33
33
|
## (De)Queueing
|
34
34
|
To queue a job, tell resque to `remote_enqueue` your job by passing the string representation of your job's class name, the name of the queue to use, and whatever parameters are appropriate for the job.
|
35
35
|
|
36
|
-
Resque.remote_enqueue('
|
36
|
+
Resque.remote_enqueue('UpdateStockTicker', :ticker_low, param1, param2, ...)
|
37
37
|
|
38
38
|
To dequeue, call `remote_dequeue` instead:
|
39
39
|
|
40
|
-
Resque.remote_dequeue('
|
40
|
+
Resque.remote_dequeue('UpdateStockTicker', :ticker_low, param1, param2, ...)
|
41
41
|
|
42
42
|
## Worker processing
|
43
43
|
|
@@ -45,7 +45,7 @@ Resque Remotes purpose is to make remote job processing doable. Hence, your work
|
|
45
45
|
|
46
46
|
Note that the queue this job belongs to isn't defined in our job class because it's metadata that Resque uses when it first queues the job, which we've already done. So, no `@queue = :low_priority` needed here.
|
47
47
|
|
48
|
-
class
|
48
|
+
class UpdateStockTicker
|
49
49
|
# no queue needed
|
50
50
|
|
51
51
|
def self.perform(param1, param2)
|
data/resque-remote.gemspec
CHANGED
@@ -8,8 +8,10 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.authors = ['BJ Neilsen']
|
9
9
|
s.email = ['bj.neilsen@gmail.com']
|
10
10
|
s.homepage = 'http://github.com/localshred/resque-remote'
|
11
|
-
s.summary = 'Resque plugin to allow remote job droppability'
|
11
|
+
s.summary = 'Resque plugin to allow remote job droppability compatible with Resque 1.x'
|
12
12
|
s.description = %Q{
|
13
|
+
Compatible with Resque 1.x. Use Resque.push if you are using >= 2.x.
|
14
|
+
|
13
15
|
Resque is great. So is job processing with redis. Our biggest drawback has been that
|
14
16
|
resque requires the class that will be processing a job to be loaded when the job
|
15
17
|
is enqueued. But what happens when the implementing job is defined in a separate application
|
@@ -27,7 +29,7 @@ Feedback, comments and questions are welcome at bj [dot] neilsen [at] gmail [dot
|
|
27
29
|
s.required_rubygems_version = '>= 1.3.6'
|
28
30
|
s.rubyforge_project = 'resque-remote'
|
29
31
|
|
30
|
-
s.add_dependency 'resque', '
|
32
|
+
s.add_dependency 'resque', '< 2.0'
|
31
33
|
|
32
34
|
s.add_development_dependency 'bundler', '~> 1.0'
|
33
35
|
s.add_development_dependency 'rspec', '~> 2.8'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-remote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,27 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-03-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: resque
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - <
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '2.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - <
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: bundler
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '1.0'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.0'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: rspec
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ~>
|
@@ -43,9 +53,17 @@ dependencies:
|
|
43
53
|
version: '2.8'
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.8'
|
47
62
|
description: ! '
|
48
63
|
|
64
|
+
Compatible with Resque 1.x. Use Resque.push if you are using >= 2.x.
|
65
|
+
|
66
|
+
|
49
67
|
Resque is great. So is job processing with redis. Our biggest drawback has been
|
50
68
|
that
|
51
69
|
|
@@ -110,9 +128,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
128
|
version: 1.3.6
|
111
129
|
requirements: []
|
112
130
|
rubyforge_project: resque-remote
|
113
|
-
rubygems_version: 1.8.
|
131
|
+
rubygems_version: 1.8.24
|
114
132
|
signing_key:
|
115
133
|
specification_version: 3
|
116
|
-
summary: Resque plugin to allow remote job droppability
|
134
|
+
summary: Resque plugin to allow remote job droppability compatible with Resque 1.x
|
117
135
|
test_files: []
|
118
136
|
has_rdoc:
|