activejob-status 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/activejob-status.rb +8 -0
- data/lib/activejob-status/status.rb +1 -1
- data/lib/activejob-status/storage.rb +5 -1
- data/lib/activejob-status/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbf08a7135223ee7668b87d3d6945b6a0ccdf6ce
|
4
|
+
data.tar.gz: 3b51fef3f75731956763e4664d669e6b3d359100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 479d9db16e8c3e78612344b518ee95684469a8265d6af2c411106068d49c0214a234a39c2a83f8f942b224dabb5b5e8e07c45e3b90b1f4df279149ad7dc36dd4
|
7
|
+
data.tar.gz: b3e2390548881142a8da0065879478e1646b8d7d8ad69571949dc2dd260887196531b1aced8f1b31fb6567d8c513d2010b97a7a068515a2923ec850ee28b075b
|
data/lib/activejob-status.rb
CHANGED
@@ -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
|
@@ -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:
|
25
|
+
store.write(key(job), message, expires_in: options[:expires_in])
|
22
26
|
end
|
23
27
|
|
24
28
|
def update(job, message)
|
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.
|
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:
|
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:
|
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:
|
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.
|
72
|
+
rubygems_version: 2.6.12
|
74
73
|
signing_key:
|
75
74
|
specification_version: 4
|
76
75
|
summary: Monitor your jobs
|