relaxed-job 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/relaxed_job/queue.rb +4 -3
- data/relaxed-job.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/lib/relaxed_job/queue.rb
CHANGED
@@ -10,8 +10,8 @@ class RelaxedJob::Queue
|
|
10
10
|
@options = options
|
11
11
|
end
|
12
12
|
|
13
|
-
def enqueue(object)
|
14
|
-
enqueue_with_method object, :perform
|
13
|
+
def enqueue(object, *args)
|
14
|
+
enqueue_with_method object, :perform, *args
|
15
15
|
end
|
16
16
|
|
17
17
|
def enqueue_with_method(object, method, *args)
|
@@ -49,10 +49,11 @@ class RelaxedJob::Queue
|
|
49
49
|
locked_jobs.each do |job|
|
50
50
|
begin
|
51
51
|
object = Marshal.load(job['object'])
|
52
|
-
object.send(job['method'], *(job['arguments']))
|
52
|
+
retval = object.send(job['method'], *(job['arguments']))
|
53
53
|
|
54
54
|
counts[:complete] += 1
|
55
55
|
|
56
|
+
job['retval'] = retval
|
56
57
|
job['state'] = 'complete'
|
57
58
|
job['completed_at'] = Time.now.utc
|
58
59
|
couchdb.save_doc(job)
|
data/relaxed-job.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{relaxed-job}
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["David Dollar"]
|
12
|
-
s.date = %q{2010-02-
|
12
|
+
s.date = %q{2010-02-26}
|
13
13
|
s.description = %q{A job system based in CouchDB}
|
14
14
|
s.email = %q{<ddollar@gmail.com>}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 1
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 1.
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 1.2.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- David Dollar
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-02-
|
17
|
+
date: 2010-02-26 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|