activejob-status 0.1.1 → 0.1.2

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: 91270803a5d6aedcc62a941ff58924eacfc41b8c
4
- data.tar.gz: a56e19cb1959a274fa10aff9094f02b60ab10e9a
3
+ metadata.gz: fbf08a7135223ee7668b87d3d6945b6a0ccdf6ce
4
+ data.tar.gz: 3b51fef3f75731956763e4664d669e6b3d359100
5
5
  SHA512:
6
- metadata.gz: 75d8b48d03c42bc15d7c608d11bd304109215f020cde362c19708c3325b8f3789169c605c2b73ccab3c981ad950e9faa43aee0625c7d42f3a6060c5abd41d5e2
7
- data.tar.gz: 2fa52788bbbab62b350ba48c10ac2fc5cc16fc11c68ef5149292fb2fcd3319f96886ec025888cea628fcd0c74f56e641a7b100db7f8db86889e6566a76bfffeb
6
+ metadata.gz: 479d9db16e8c3e78612344b518ee95684469a8265d6af2c411106068d49c0214a234a39c2a83f8f942b224dabb5b5e8e07c45e3b90b1f4df279149ad7dc36dd4
7
+ data.tar.gz: b3e2390548881142a8da0065879478e1646b8d7d8ad69571949dc2dd260887196531b1aced8f1b31fb6567d8c513d2010b97a7a068515a2923ec850ee28b075b
@@ -26,6 +26,14 @@ module ActiveJob::Status
26
26
  end
27
27
 
28
28
  class << self
29
+ def options= options
30
+ @@options = options
31
+ end
32
+
33
+ def options
34
+ @@options || { expires_in: DEFAULT_EXPIRY }
35
+ end
36
+
29
37
  def store= store
30
38
  store = ActiveSupport::Cache.lookup_store(store) if store.is_a?(Symbol)
31
39
  @@store = store
@@ -1,7 +1,7 @@
1
1
  module ActiveJob::Status
2
2
  class Status
3
3
  delegate :[], :to_s, :inspect, to: :read
4
- delegate :queued?, :working?, :completed?, to: :status_inquiry
4
+ delegate :queued?, :working?, :completed?, :failed?, to: :status_inquiry
5
5
 
6
6
  def initialize(job)
7
7
  @job = job
@@ -5,6 +5,10 @@ module ActiveJob::Status
5
5
  ActiveJob::Status.store
6
6
  end
7
7
 
8
+ def options
9
+ ActiveJob::Status.options
10
+ end
11
+
8
12
  def job_id(job)
9
13
  job.is_a?(String) ? job : job.job_id
10
14
  end
@@ -18,7 +22,7 @@ module ActiveJob::Status
18
22
  end
19
23
 
20
24
  def write(job, message)
21
- store.write(key(job), message, expires_in: DEFAULT_EXPIRY)
25
+ store.write(key(job), message, expires_in: options[:expires_in])
22
26
  end
23
27
 
24
28
  def update(job, message)
@@ -1,5 +1,5 @@
1
1
  module ActiveJob
2
2
  module Status
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activejob-status
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Savater Sebastien
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-29 00:00:00.000000000 Z
11
+ date: 2017-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '4.2'
41
- description: Monitor jobs created by ActiveJob, check their status and progress
41
+ description:
42
42
  email:
43
43
  - savater.sebastien@gmail.com
44
44
  executables: []
@@ -50,9 +50,8 @@ files:
50
50
  - lib/activejob-status/status.rb
51
51
  - lib/activejob-status/storage.rb
52
52
  - lib/activejob-status/version.rb
53
- homepage: http://github.com/inkstak/activejob-status
54
- licenses:
55
- - MIT
53
+ homepage:
54
+ licenses: []
56
55
  metadata: {}
57
56
  post_install_message:
58
57
  rdoc_options: []
@@ -70,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
69
  version: '0'
71
70
  requirements: []
72
71
  rubyforge_project:
73
- rubygems_version: 2.4.6
72
+ rubygems_version: 2.6.12
74
73
  signing_key:
75
74
  specification_version: 4
76
75
  summary: Monitor your jobs