kue_ruby 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -6
- data/bin/console +0 -0
- data/bin/setup +0 -0
- data/lib/kue_ruby.rb +3 -0
- data/lib/kue_ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccd02c4ec5d53613a4fdb1f2641351e1183390e1
|
4
|
+
data.tar.gz: 38f6dd5c33d9bc404ec919147bf451b104d69900
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bafca1fafe354c41708499dce9eb9f60a5705154baa4d076a131c09b4378aa90434bbf764df9052e694f41964c9322467ce0e504a398b44c6e494edef94c048
|
7
|
+
data.tar.gz: 30a4fe32d6c838d8ad186f140cb718c33a297b2c0214d444388f1123988ca257f72e4623f661cfe13d8429bddbad0352c1c194d749955bef7617657ecde6e9b7
|
data/Gemfile.lock
CHANGED
@@ -1,18 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
kue_ruby (0.
|
4
|
+
kue_ruby (0.4.0)
|
5
5
|
redis (~> 4.0.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
coderay (1.1.2)
|
11
10
|
diff-lcs (1.3)
|
12
|
-
method_source (0.8.2)
|
13
|
-
pry (0.11.0)
|
14
|
-
coderay (~> 1.1.0)
|
15
|
-
method_source (~> 0.8.1)
|
16
11
|
rake (10.4.2)
|
17
12
|
redis (4.0.0)
|
18
13
|
rspec (3.6.0)
|
data/bin/console
CHANGED
File without changes
|
data/bin/setup
CHANGED
File without changes
|
data/lib/kue_ruby.rb
CHANGED
@@ -42,6 +42,7 @@ class KueRuby
|
|
42
42
|
# @option options Hash :data hash of job data
|
43
43
|
# @option options [Integer] :max_attempts max attempts for the job
|
44
44
|
# @option options [Integer] :priority default is 0/normal
|
45
|
+
# @option options [Integer] :ttl expiry value for time the job can live in active state (ms)
|
45
46
|
#
|
46
47
|
# @return [KueJob] a new kue job
|
47
48
|
def create_job(options = {})
|
@@ -61,6 +62,7 @@ class KueRuby
|
|
61
62
|
# @option options Hash :data hash of job data
|
62
63
|
# @option options [Integer] :max_attempts max attempts for the job
|
63
64
|
# @option options [Integer] :priority default is 0/normal
|
65
|
+
# @option options [Integer] :ttl expiry value for time the job can live in active state (ms)
|
64
66
|
#
|
65
67
|
# @return KueJob a new kue job, throwing on exception
|
66
68
|
def create_job!(options = {})
|
@@ -69,6 +71,7 @@ class KueRuby
|
|
69
71
|
job = KueJob.new
|
70
72
|
job.type = options[:type]
|
71
73
|
job.data = options[:data]
|
74
|
+
job.ttl = options[:ttl] if options[:ttl]
|
72
75
|
job.priority = options[:priority] ? options[:priority] : 0
|
73
76
|
job.max_attempts = options[:max_attempts] ? options[:max_attempts] : 1
|
74
77
|
job.state = 'inactive'
|
data/lib/kue_ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kue_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Beckman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|