good_job 3.17.2 → 3.17.3
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 +20 -0
- data/README.md +7 -5
- data/lib/good_job/http_server.rb +5 -3
- data/lib/good_job/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 46ab9513d6943173f1c0c81f0755ac6870581595e2962ca0e438b32cdb9eec6e
|
|
4
|
+
data.tar.gz: 0aeebddc6f1ad80fc1d0cba1c4d923b17c6d9bae2fcafdd3282fc9d6cf4ec57f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2c5491f403270ee5029dd1032d42421a721c996c35491198ee46901073dbc40fa3974e2d91d757905a474b524a3a3d8c8b27bae1d1ad661f0559d553df97dd7c
|
|
7
|
+
data.tar.gz: 26d55dec3a1a9c5bcef140f612a391ee14688f686ffc9300ab7ed98309e692de21c6ef5c623794545fb9f754656d731dbc3146e8264ff060f902837b8ba379b8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v3.17.3](https://github.com/bensheldon/good_job/tree/v3.17.3) (2023-08-19)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.17.2...v3.17.3)
|
|
6
|
+
|
|
7
|
+
**Fixed bugs:**
|
|
8
|
+
|
|
9
|
+
- New probe server fixes: allow accept\_nonblock to raise and IO.gets return nil [\#1043](https://github.com/bensheldon/good_job/pull/1043) ([stas](https://github.com/stas))
|
|
10
|
+
|
|
11
|
+
**Closed issues:**
|
|
12
|
+
|
|
13
|
+
- Dashboard as separate package? [\#965](https://github.com/bensheldon/good_job/issues/965)
|
|
14
|
+
- Managing jobs with errors [\#929](https://github.com/bensheldon/good_job/issues/929)
|
|
15
|
+
- Feature: dynamic options for good\_job\_control\_concurrency\_with [\#684](https://github.com/bensheldon/good_job/issues/684)
|
|
16
|
+
|
|
17
|
+
**Merged pull requests:**
|
|
18
|
+
|
|
19
|
+
- Attempt to overcome github\_changelog\_generator's rate limit problem [\#1045](https://github.com/bensheldon/good_job/pull/1045) ([bensheldon](https://github.com/bensheldon))
|
|
20
|
+
- \[Doc\] for cron schedule add info about Dashboard view [\#1042](https://github.com/bensheldon/good_job/pull/1042) ([steveroot](https://github.com/steveroot))
|
|
21
|
+
- Add description of :class to readme for cron style repeating jobs section [\#1040](https://github.com/bensheldon/good_job/pull/1040) ([steveroot](https://github.com/steveroot))
|
|
22
|
+
|
|
3
23
|
## [v3.17.2](https://github.com/bensheldon/good_job/tree/v3.17.2) (2023-08-10)
|
|
4
24
|
|
|
5
25
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.17.1...v3.17.2)
|
data/README.md
CHANGED
|
@@ -473,7 +473,7 @@ GoodJob's concurrency control strategy for `perform_limit` is "optimistic retry
|
|
|
473
473
|
|
|
474
474
|
### Cron-style repeating/recurring jobs
|
|
475
475
|
|
|
476
|
-
GoodJob can enqueue jobs on a recurring basis that can be used as a replacement for cron.
|
|
476
|
+
GoodJob can enqueue Active Job jobs on a recurring basis that can be used as a replacement for cron.
|
|
477
477
|
|
|
478
478
|
Cron-style jobs can be performed by any GoodJob process (e.g., CLI or `:async` execution mode) that has `config.good_job.enable_cron` set to `true`. That is, one or more job executor processes can be configured to perform recurring jobs.
|
|
479
479
|
|
|
@@ -481,6 +481,8 @@ GoodJob's cron uses unique indexes to ensure that only a single job is enqueued
|
|
|
481
481
|
|
|
482
482
|
Cron-format is parsed by the [`fugit`](https://github.com/floraison/fugit) gem, which has support for seconds-level resolution (e.g. `* * * * * *`) and natural language parsing (e.g. `every second`).
|
|
483
483
|
|
|
484
|
+
If you use the [Dashboard](#dashboard) the scheduled tasks can be viewed in the 'cron' menu. In this view you can also disable a task or run/enqueue a task immediately.
|
|
485
|
+
|
|
484
486
|
```ruby
|
|
485
487
|
# config/environments/application.rb or a specific environment e.g. production.rb
|
|
486
488
|
|
|
@@ -492,10 +494,10 @@ config.good_job.cron = {
|
|
|
492
494
|
# Every 15 minutes, enqueue `ExampleJob.set(priority: -10).perform_later(42, "life", name: "Alice")`
|
|
493
495
|
frequent_task: { # each recurring job must have a unique key
|
|
494
496
|
cron: "*/15 * * * *", # cron-style scheduling format by fugit gem
|
|
495
|
-
class: "ExampleJob", #
|
|
496
|
-
args: [42, "life"], # positional arguments to pass; can also be a proc e.g. `-> { [Time.now] }`
|
|
497
|
-
kwargs: { name: "Alice" }, # keyword arguments to pass; can also be a proc e.g. `-> { { name: NAMES.sample } }`
|
|
498
|
-
set: { priority: -10 }, # additional
|
|
497
|
+
class: "ExampleJob", # name of the job class as a String; must reference an Active Job job class
|
|
498
|
+
args: [42, "life"], # positional arguments to pass to the job; can also be a proc e.g. `-> { [Time.now] }`
|
|
499
|
+
kwargs: { name: "Alice" }, # keyword arguments to pass to the job; can also be a proc e.g. `-> { { name: NAMES.sample } }`
|
|
500
|
+
set: { priority: -10 }, # additional Active Job properties; can also be a lambda/proc e.g. `-> { { priority: [1,2].sample } }`
|
|
499
501
|
description: "Something helpful", # optional description that appears in Dashboard
|
|
500
502
|
},
|
|
501
503
|
another_task: {
|
data/lib/good_job/http_server.rb
CHANGED
|
@@ -46,11 +46,13 @@ module GoodJob
|
|
|
46
46
|
ready_sockets, = IO.select([@server], nil, nil, SOCKET_READ_TIMEOUT)
|
|
47
47
|
next unless ready_sockets
|
|
48
48
|
|
|
49
|
-
client = @server.accept_nonblock
|
|
49
|
+
client = @server.accept_nonblock
|
|
50
50
|
request = client.gets
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
if request
|
|
53
|
+
status, headers, body = @app.call(parse_request(request))
|
|
54
|
+
respond(client, status, headers, body)
|
|
55
|
+
end
|
|
54
56
|
|
|
55
57
|
client.close
|
|
56
58
|
rescue IO::WaitReadable, Errno::EINTR
|
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: 3.17.
|
|
4
|
+
version: 3.17.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Sheldon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-08-
|
|
11
|
+
date: 2023-08-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activejob
|