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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16ca548bd2deda07050ad7e804647377ef10e413
4
- data.tar.gz: cab8f99e8c4dfa6256bb520699af261d89e05ff0
3
+ metadata.gz: ccd02c4ec5d53613a4fdb1f2641351e1183390e1
4
+ data.tar.gz: 38f6dd5c33d9bc404ec919147bf451b104d69900
5
5
  SHA512:
6
- metadata.gz: 7d71cc6522f387597f5885c85928fa81e21fc4b7ac0cc0fa42df6068f93a5eccec870844c7ce54d74e557ad7a7abad95719ec31ad005ed4fb46e7b9a5502a0e1
7
- data.tar.gz: 44f9a62c4787ec481e577c95cf13df9596b995a2eef84cce53274930553cc4cdfe99719e97bd61cbea5d659853a22e97ad0e7bb8f0e4a4b066e8d8e4a1365706
6
+ metadata.gz: 9bafca1fafe354c41708499dce9eb9f60a5705154baa4d076a131c09b4378aa90434bbf764df9052e694f41964c9322467ce0e504a398b44c6e494edef94c048
7
+ data.tar.gz: 30a4fe32d6c838d8ad186f140cb718c33a297b2c0214d444388f1123988ca257f72e4623f661cfe13d8429bddbad0352c1c194d749955bef7617657ecde6e9b7
@@ -1,18 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kue_ruby (0.3.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)
File without changes
data/bin/setup CHANGED
File without changes
@@ -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'
@@ -1,3 +1,3 @@
1
1
  class KueRuby
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
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.3.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: 2017-09-25 00:00:00.000000000 Z
11
+ date: 2018-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis