good_job 0.4.0 → 0.5.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 +13 -4
- data/README.md +26 -5
- data/lib/active_job/queue_adapters/good_job_adapter.rb +13 -0
- data/lib/good_job.rb +2 -0
- data/lib/good_job/adapter.rb +0 -2
- data/lib/good_job/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c11065689d3442c14ab8afb08ad17a96c45414287e9c24440d26be766eff3566
|
4
|
+
data.tar.gz: 316168ca2ecf9aa9a239d007b85b589c34ec68064ad3ec376665bb893aceae4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cb0b54f3e2a7189684fb5f3ea98ea4febd6e1651ff7f9f47b78be19e9a4948c731c9e990e89921b3763236a33cbf45905d8c05c417d5044caaf844b67600510
|
7
|
+
data.tar.gz: 8f45cc0b5ccd1c61c3e55ac748359156d3f4081646537b327476bd964e15e45e6a953c01ae0f237b0c08fd7bcbd3bd94bf9d7bb484c45d26600790f7870b9ccf
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [0.
|
3
|
+
## [0.5.0](https://github.com/bensheldon/good_job/tree/0.5.0) (2020-07-13)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/bensheldon/good_job/compare/v0.
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v0.4.0...0.5.0)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Update development Ruby to 2.6.6 and gems [\#29](https://github.com/bensheldon/good_job/pull/29) ([bensheldon](https://github.com/bensheldon))
|
10
|
+
- Allow configuration of Rails queue adapter with `:good\_job` [\#28](https://github.com/bensheldon/good_job/pull/28) ([bensheldon](https://github.com/bensheldon))
|
11
|
+
|
12
|
+
## [v0.4.0](https://github.com/bensheldon/good_job/tree/v0.4.0) (2020-03-31)
|
13
|
+
|
14
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v0.3.0...v0.4.0)
|
6
15
|
|
7
16
|
**Merged pull requests:**
|
8
17
|
|
@@ -18,6 +27,7 @@
|
|
18
27
|
- Update development Ruby to 2.6.5 [\#22](https://github.com/bensheldon/good_job/pull/22) ([bensheldon](https://github.com/bensheldon))
|
19
28
|
- Simplify the internal API, removing JobWrapper and InlineScheduler [\#21](https://github.com/bensheldon/good_job/pull/21) ([bensheldon](https://github.com/bensheldon))
|
20
29
|
- Generate a new future for every executed job [\#20](https://github.com/bensheldon/good_job/pull/20) ([bensheldon](https://github.com/bensheldon))
|
30
|
+
- Configuration for maximum number of job execution threads [\#18](https://github.com/bensheldon/good_job/pull/18) ([bensheldon](https://github.com/bensheldon))
|
21
31
|
|
22
32
|
## [v0.2.2](https://github.com/bensheldon/good_job/tree/v0.2.2) (2020-03-08)
|
23
33
|
|
@@ -25,7 +35,6 @@
|
|
25
35
|
|
26
36
|
**Merged pull requests:**
|
27
37
|
|
28
|
-
- Configuration for maximum number of job execution threads [\#18](https://github.com/bensheldon/good_job/pull/18) ([bensheldon](https://github.com/bensheldon))
|
29
38
|
- Gracefully shutdown Scheduler when executable receives TERM or INT [\#17](https://github.com/bensheldon/good_job/pull/17) ([bensheldon](https://github.com/bensheldon))
|
30
39
|
- Update Appraisals [\#16](https://github.com/bensheldon/good_job/pull/16) ([bensheldon](https://github.com/bensheldon))
|
31
40
|
|
@@ -37,7 +46,6 @@
|
|
37
46
|
|
38
47
|
- Clean up Gemspec [\#15](https://github.com/bensheldon/good_job/pull/15) ([bensheldon](https://github.com/bensheldon))
|
39
48
|
- Set up Rubocop [\#14](https://github.com/bensheldon/good_job/pull/14) ([bensheldon](https://github.com/bensheldon))
|
40
|
-
- Add pg gem as explicit dependency [\#13](https://github.com/bensheldon/good_job/pull/13) ([bensheldon](https://github.com/bensheldon))
|
41
49
|
- Bump nokogiri from 1.10.7 to 1.10.9 [\#12](https://github.com/bensheldon/good_job/pull/12) ([dependabot[bot]](https://github.com/apps/dependabot))
|
42
50
|
- Add Appraisal with tests for Rails 5.1, 5.2, 6.0 [\#11](https://github.com/bensheldon/good_job/pull/11) ([bensheldon](https://github.com/bensheldon))
|
43
51
|
|
@@ -47,6 +55,7 @@
|
|
47
55
|
|
48
56
|
**Merged pull requests:**
|
49
57
|
|
58
|
+
- Add pg gem as explicit dependency [\#13](https://github.com/bensheldon/good_job/pull/13) ([bensheldon](https://github.com/bensheldon))
|
50
59
|
- Use Rails.logger and ActiveSupport::Notifications for logging instead of puts [\#10](https://github.com/bensheldon/good_job/pull/10) ([bensheldon](https://github.com/bensheldon))
|
51
60
|
- Remove minitest files [\#9](https://github.com/bensheldon/good_job/pull/9) ([bensheldon](https://github.com/bensheldon))
|
52
61
|
- Use scheduled\_at and priority for scheduling [\#8](https://github.com/bensheldon/good_job/pull/8) ([bensheldon](https://github.com/bensheldon))
|
data/README.md
CHANGED
@@ -14,12 +14,12 @@ Inspired by [Delayed::Job](https://github.com/collectiveidea/delayed_job) and [Q
|
|
14
14
|
Add this line to your application's Gemfile:
|
15
15
|
|
16
16
|
```ruby
|
17
|
-
gem 'good_job'
|
17
|
+
gem 'good_job'
|
18
18
|
```
|
19
19
|
|
20
20
|
And then execute:
|
21
21
|
```bash
|
22
|
-
$ bundle
|
22
|
+
$ bundle install
|
23
23
|
```
|
24
24
|
|
25
25
|
## Usage
|
@@ -56,11 +56,21 @@ $ bundle
|
|
56
56
|
|
57
57
|
1. Configure the ActiveJob adapter:
|
58
58
|
```ruby
|
59
|
-
# config/
|
60
|
-
config.active_job.queue_adapter =
|
61
|
-
|
59
|
+
# config/application.rb
|
60
|
+
config.active_job.queue_adapter = :good_job
|
61
|
+
```
|
62
|
+
|
63
|
+
By default, using `:good_job` is equivalent to manually configuring the adapter:
|
64
|
+
|
65
|
+
```ruby
|
62
66
|
# config/environments/development.rb
|
63
67
|
config.active_job.queue_adapter = GoodJob::Adapter.new(inline: true)
|
68
|
+
|
69
|
+
# config/environments/test.rb
|
70
|
+
config.active_job.queue_adapter = GoodJob::Adapter.new(inline: true)
|
71
|
+
|
72
|
+
# config/environments/production.rb
|
73
|
+
config.active_job.queue_adapter = GoodJob::Adapter.new
|
64
74
|
```
|
65
75
|
|
66
76
|
1. In production, the scheduler is designed to run in its own process:
|
@@ -94,6 +104,17 @@ $ bin/setup_test
|
|
94
104
|
$ bin/rspec
|
95
105
|
```
|
96
106
|
|
107
|
+
This gem uses Appraisal to run tests against multiple versions of Rails:
|
108
|
+
|
109
|
+
```bash
|
110
|
+
# Install Appraisal(s) gemfiles
|
111
|
+
$ bundle exec appraisal
|
112
|
+
|
113
|
+
# Run tests
|
114
|
+
$ bundle exec appraisal bin/rspec
|
115
|
+
|
116
|
+
```
|
117
|
+
|
97
118
|
For developing locally within another Ruby on Rails project:
|
98
119
|
|
99
120
|
```bash
|
data/lib/good_job.rb
CHANGED
data/lib/good_job/adapter.rb
CHANGED
data/lib/good_job/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: good_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Sheldon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -207,6 +207,7 @@ files:
|
|
207
207
|
- LICENSE.txt
|
208
208
|
- README.md
|
209
209
|
- exe/good_job
|
210
|
+
- lib/active_job/queue_adapters/good_job_adapter.rb
|
210
211
|
- lib/good_job.rb
|
211
212
|
- lib/good_job/adapter.rb
|
212
213
|
- lib/good_job/cli.rb
|