good_job 4.19.0 → 4.19.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7afb27ab67bbbe17bf951784355a40adf87515486c7fd28c5cb12af3e2135005
|
|
4
|
+
data.tar.gz: 9f1da0f02768f9131a3c75ff1d181170a169662f631a83f05862608c579a30e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e9e6c72eba0c338334e2acb94cc87e2b5f433ac2b36fd2ec05a1a58656dc5c6ff7d5f4d22f218aeaa04b0f432a44d908654ab0c25dd7c82194acb505539952f
|
|
7
|
+
data.tar.gz: 912da2530fec05469474232f8246f9370dd1da24e822bcf6bcb37b6f649b43ab6d0836d5999a6105eb06f999cc26bde9e94601280093451becf34c2daeb76598
|
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v4.19.1](https://github.com/bensheldon/good_job/tree/v4.19.1) (2026-06-25)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.19.0...v4.19.1)
|
|
6
|
+
|
|
7
|
+
**Fixed bugs:**
|
|
8
|
+
|
|
9
|
+
- Support Rails Edge version of Arel::Table [\#1783](https://github.com/bensheldon/good_job/pull/1783) ([luizkowalski](https://github.com/luizkowalski))
|
|
10
|
+
- Emit ActiveSupport::Notifications for concurrency-aborted enqueues [\#1779](https://github.com/bensheldon/good_job/pull/1779) ([bdewater-thatch](https://github.com/bdewater-thatch))
|
|
11
|
+
|
|
12
|
+
**Closed issues:**
|
|
13
|
+
|
|
14
|
+
- The probe server doesn't handle SIGINT/SIGTERM [\#1632](https://github.com/bensheldon/good_job/issues/1632)
|
|
15
|
+
|
|
3
16
|
## [v4.19.0](https://github.com/bensheldon/good_job/tree/v4.19.0) (2026-05-27)
|
|
4
17
|
|
|
5
|
-
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.18.
|
|
18
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.18.3...v4.19.0)
|
|
6
19
|
|
|
7
20
|
**Implemented enhancements:**
|
|
8
21
|
|
|
@@ -18,6 +31,17 @@
|
|
|
18
31
|
- Make execution state completely Fiber-safe via Rails isolated execution state [\#1765](https://github.com/bensheldon/good_job/pull/1765) ([ollym](https://github.com/ollym))
|
|
19
32
|
- Handle nil updated\_at in stale? method [\#1764](https://github.com/bensheldon/good_job/pull/1764) ([gavinballard](https://github.com/gavinballard))
|
|
20
33
|
|
|
34
|
+
**Merged pull requests:**
|
|
35
|
+
|
|
36
|
+
- Prune CI test matrix to boundary Ruby versions per Rails version [\#1777](https://github.com/bensheldon/good_job/pull/1777) ([bensheldon](https://github.com/bensheldon))
|
|
37
|
+
- Refactor Concurrency::Rule to use explicit ivars instead of options hash [\#1776](https://github.com/bensheldon/good_job/pull/1776) ([bensheldon](https://github.com/bensheldon))
|
|
38
|
+
- Fix typo in README.md [\#1773](https://github.com/bensheldon/good_job/pull/1773) ([NobodysNightmare](https://github.com/NobodysNightmare))
|
|
39
|
+
- Use explicit keyword arguments for concurrency controls [\#1770](https://github.com/bensheldon/good_job/pull/1770) ([bdewater-thatch](https://github.com/bdewater-thatch))
|
|
40
|
+
|
|
41
|
+
## [v4.18.3](https://github.com/bensheldon/good_job/tree/v4.18.3) (2026-05-27)
|
|
42
|
+
|
|
43
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.18.2...v4.18.3)
|
|
44
|
+
|
|
21
45
|
**Closed issues:**
|
|
22
46
|
|
|
23
47
|
- enable\_pauses ENV var check has singular/plural mismatch [\#1771](https://github.com/bensheldon/good_job/issues/1771)
|
|
@@ -27,13 +51,6 @@
|
|
|
27
51
|
- Job runner process enters a loop on create\_listen\_task - stale check fails [\#1649](https://github.com/bensheldon/good_job/issues/1649)
|
|
28
52
|
- Set a default queue\_select\_limit [\#1596](https://github.com/bensheldon/good_job/issues/1596)
|
|
29
53
|
|
|
30
|
-
**Merged pull requests:**
|
|
31
|
-
|
|
32
|
-
- Prune CI test matrix to boundary Ruby versions per Rails version [\#1777](https://github.com/bensheldon/good_job/pull/1777) ([bensheldon](https://github.com/bensheldon))
|
|
33
|
-
- Refactor Concurrency::Rule to use explicit ivars instead of options hash [\#1776](https://github.com/bensheldon/good_job/pull/1776) ([bensheldon](https://github.com/bensheldon))
|
|
34
|
-
- Fix typo in README.md [\#1773](https://github.com/bensheldon/good_job/pull/1773) ([NobodysNightmare](https://github.com/NobodysNightmare))
|
|
35
|
-
- Use explicit keyword arguments for concurrency controls [\#1770](https://github.com/bensheldon/good_job/pull/1770) ([bdewater-thatch](https://github.com/bdewater-thatch))
|
|
36
|
-
|
|
37
54
|
## [v4.18.2](https://github.com/bensheldon/good_job/tree/v4.18.2) (2026-04-20)
|
|
38
55
|
|
|
39
56
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.18.1...v4.18.2)
|
|
@@ -207,6 +207,7 @@ module GoodJob
|
|
|
207
207
|
end
|
|
208
208
|
|
|
209
209
|
ADVISORY_LOCK_COUNTS = AdvisoryLockCounter.new
|
|
210
|
+
AREL_TABLE_NEW_KWARGS = Arel::Table.instance_method(:initialize).parameters.any? { |type, name| type == :key && name == :name }
|
|
210
211
|
|
|
211
212
|
included do
|
|
212
213
|
# Default column to be used when creating Advisory Locks
|
|
@@ -357,7 +358,7 @@ module GoodJob
|
|
|
357
358
|
primary_key_for_select = primary_key.to_sym
|
|
358
359
|
column_for_select = column.to_sym
|
|
359
360
|
|
|
360
|
-
cte_table =
|
|
361
|
+
cte_table = arel_table_for(:rows)
|
|
361
362
|
cte_query = original_query.except(:limit)
|
|
362
363
|
cte_query = if primary_key_for_select == column_for_select
|
|
363
364
|
cte_query.select(primary_key_for_select)
|
|
@@ -485,6 +486,13 @@ module GoodJob
|
|
|
485
486
|
|
|
486
487
|
private
|
|
487
488
|
|
|
489
|
+
# Arel::Table.new has different parameters depending on Rails version.
|
|
490
|
+
# New version expects keyword arguments for the name while the old version expects a positional argument.
|
|
491
|
+
# This method creates a new Arel::Table instance with the correct parameters.
|
|
492
|
+
def arel_table_for(name)
|
|
493
|
+
AREL_TABLE_NEW_KWARGS ? Arel::Table.new(name: name) : Arel::Table.new(name)
|
|
494
|
+
end
|
|
495
|
+
|
|
488
496
|
# Executes a single pg_advisory_unlock call and updates bookkeeping.
|
|
489
497
|
# Used by {.advisory_unlock_key} and {.advisory_unlock_key!} to avoid
|
|
490
498
|
# mutual recursion when CTE-aware cleanup is needed.
|
data/config/brakeman.ignore
CHANGED
|
@@ -66,13 +66,13 @@
|
|
|
66
66
|
{
|
|
67
67
|
"warning_type": "Dangerous Eval",
|
|
68
68
|
"warning_code": 13,
|
|
69
|
-
"fingerprint": "
|
|
69
|
+
"fingerprint": "c01ff32ee40cc694540aaa76e3fdab8f330babd9d6dbf2564c32aef1cfd877fa",
|
|
70
70
|
"check_name": "Evaluation",
|
|
71
71
|
"message": "Dynamic string evaluated as code",
|
|
72
72
|
"file": "lib/good_job/log_subscriber.rb",
|
|
73
|
-
"line":
|
|
73
|
+
"line": 278,
|
|
74
74
|
"link": "https://brakemanscanner.org/docs/warning_types/dangerous_eval/",
|
|
75
|
-
"code": "class_eval(\" def #{level}(progname = nil, tags: [], &block) # def info(progname = nil, tags: [], &block)\\n return unless logger # return unless logger\\n #\\n tag_logger(*tags) do # tag_logger(*tags) do\\n logger.#{level}(progname, &block) # logger.info(progname, &block)\\n end # end\\n end #\\n\", \"lib/good_job/log_subscriber.rb\", (
|
|
75
|
+
"code": "class_eval(\" def #{level}(progname = nil, tags: [], &block) # def info(progname = nil, tags: [], &block)\\n return unless logger # return unless logger\\n #\\n tag_logger(*tags) do # tag_logger(*tags) do\\n logger.#{level}(progname, &block) # logger.info(progname, &block)\\n end # end\\n end #\\n\", \"lib/good_job/log_subscriber.rb\", (278 + 1))",
|
|
76
76
|
"render_path": null,
|
|
77
77
|
"location": {
|
|
78
78
|
"type": "method",
|
|
@@ -120,7 +120,10 @@ module GoodJob
|
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
if (enqueue_concurrency + 1) > limit
|
|
123
|
-
|
|
123
|
+
ActiveSupport::Notifications.instrument(
|
|
124
|
+
"enqueue_concurrency_limit_exceeded.good_job",
|
|
125
|
+
{ job: job, key: key, limit: limit }
|
|
126
|
+
)
|
|
124
127
|
exceeded = :limit
|
|
125
128
|
next
|
|
126
129
|
end
|
|
@@ -134,7 +137,10 @@ module GoodJob
|
|
|
134
137
|
.count
|
|
135
138
|
|
|
136
139
|
if (enqueued_within_period + 1) > throttle_limit
|
|
137
|
-
|
|
140
|
+
ActiveSupport::Notifications.instrument(
|
|
141
|
+
"enqueue_concurrency_throttle_exceeded.good_job",
|
|
142
|
+
{ job: job, key: key, limit: throttle_limit }
|
|
143
|
+
)
|
|
138
144
|
exceeded = :throttle
|
|
139
145
|
next
|
|
140
146
|
end
|
|
@@ -153,6 +153,28 @@ module GoodJob
|
|
|
153
153
|
end
|
|
154
154
|
end
|
|
155
155
|
|
|
156
|
+
# @!macro notification_responder
|
|
157
|
+
def enqueue_concurrency_limit_exceeded(event)
|
|
158
|
+
job = event.payload[:job]
|
|
159
|
+
key = event.payload[:key]
|
|
160
|
+
limit = event.payload[:limit]
|
|
161
|
+
|
|
162
|
+
info do
|
|
163
|
+
"Aborted enqueue of #{job.class.name} (Job ID: #{job.job_id}) because the concurrency key '#{key}' has reached its enqueue limit of #{limit} #{'job'.pluralize(limit)}"
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# @!macro notification_responder
|
|
168
|
+
def enqueue_concurrency_throttle_exceeded(event)
|
|
169
|
+
job = event.payload[:job]
|
|
170
|
+
key = event.payload[:key]
|
|
171
|
+
limit = event.payload[:limit]
|
|
172
|
+
|
|
173
|
+
info do
|
|
174
|
+
"Aborted enqueue of #{job.class.name} (Job ID: #{job.job_id}) because the concurrency key '#{key}' has reached its throttle limit of #{limit} #{'job'.pluralize(limit)}"
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
156
178
|
# @!macro notification_responder
|
|
157
179
|
def systemd_watchdog_start(event)
|
|
158
180
|
interval = event.payload[:interval]
|
data/lib/good_job/version.rb
CHANGED