active_job_status 1.0.0 → 1.1.0
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/CHANGELOG.md +2 -0
- data/README.md +7 -7
- data/active_job_status-1.0.0.gem +0 -0
- data/lib/active_job_status/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6b9ef8fd6afc49dd42ddff3b89715f7f0bc3c24
|
4
|
+
data.tar.gz: d577c498e486282b0d39346925321696632c2a63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 296968828f08cbc8aea202ee67cd135337ad2722ddd7f6c8c9eb69aa2bc23f6dcac85ccb273daa299f1165e6d88db70a857ad9727637a44a8952ff7e73c6ce18
|
7
|
+
data.tar.gz: 6dc29bb46f45a5e91a839a595c05687fd18a01dbecd626d6c194116c7a5f1b4a9159ba94ce3833f18585b606f5e5b30e9398a0b84bcd5264ace27b2fe799a7e7
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# ActiveJobStatus
|
6
6
|
|
7
|
-
Provides simple job status information for ActiveJob.
|
7
|
+
Provides simple job status information for ActiveJob.
|
8
8
|
|
9
9
|
This gem uses ActiveJob callbacks to set simple ActiveSupport::Cache
|
10
10
|
values to track job status
|
@@ -36,10 +36,10 @@ ActiveJobStatus to use Rails' built in memory store:
|
|
36
36
|
# config/initializers/active_job_status.rb
|
37
37
|
ActiveJobStatus.store = ActiveSupport::Cache::MemoryStore.new
|
38
38
|
|
39
|
-
If you are using Resque or Sidekiq, or have Redis in your stack already for
|
40
|
-
another reason, it's a good idea to tell ActiveJobStatus to use Redis for
|
39
|
+
If you are using Resque or Sidekiq, or have Redis in your stack already for
|
40
|
+
another reason, it's a good idea to tell ActiveJobStatus to use Redis for
|
41
41
|
storing job metadata. To do so, you'll first need to configure
|
42
|
-
ActiveSupport::Cache to use Redis for
|
42
|
+
ActiveSupport::Cache to use Redis for its store
|
43
43
|
(perhaps by using [this gem](https://github.com/redis-store/redis-rails)). Then
|
44
44
|
use the following initializer to tell ActiveJob to use the proper store.
|
45
45
|
ActiveJob status will detect Redis and use some nice optimizations.
|
@@ -49,7 +49,7 @@ ActiveJob status will detect Redis and use some nice optimizations.
|
|
49
49
|
|
50
50
|
## Usage
|
51
51
|
|
52
|
-
Have your jobs
|
52
|
+
Have your jobs inherit from ActiveJobStatus::TrackableJob instead of ActiveJob::Base:
|
53
53
|
|
54
54
|
*Note! Previous versions of this gem did not namespace TrackableJob inside of
|
55
55
|
ActiveJob Status -- it was in the global namespace. If
|
@@ -69,7 +69,7 @@ change that.
|
|
69
69
|
# => :queued, :working, :complete
|
70
70
|
|
71
71
|
### Job Batches
|
72
|
-
For job batches you an use any key you want (for example, you might use a
|
72
|
+
For job batches you an use any key you want (for example, you might use a
|
73
73
|
primary key or UUID from your database). If another batch with the same key
|
74
74
|
exists, its jobs will be overwritten with the supplied list.
|
75
75
|
|
@@ -78,7 +78,7 @@ exists, its jobs will be overwritten with the supplied list.
|
|
78
78
|
my_batch = ActiveJobStatus::JobBatch.new(batch_id: my_key, job_ids: my_jobs)
|
79
79
|
|
80
80
|
Batches expire after 72 hours (259200 seconds).
|
81
|
-
You can change that by passing the
|
81
|
+
You can change that by passing the initializer an integer value (in seconds).
|
82
82
|
|
83
83
|
my_key = "230923asdlkj230923"
|
84
84
|
my_jobs = [my_first_job.job_id, my_second_job.job_id]
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_job_status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- LICENSE.txt
|
110
110
|
- README.md
|
111
111
|
- Rakefile
|
112
|
+
- active_job_status-1.0.0.gem
|
112
113
|
- active_job_status.gemspec
|
113
114
|
- gemfiles/redis-activesupport.gemfile
|
114
115
|
- lib/active_job_status.rb
|
@@ -147,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
148
|
version: '0'
|
148
149
|
requirements: []
|
149
150
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
151
|
+
rubygems_version: 2.5.1
|
151
152
|
signing_key:
|
152
153
|
specification_version: 4
|
153
154
|
summary: Job status and batches for ActiveJob
|