good_job 4.9.1 → 4.9.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/CHANGELOG.md +8 -0
- data/app/models/good_job/cron_entry.rb +0 -2
- data/app/models/good_job/job.rb +10 -1
- data/lib/good_job/adapter.rb +4 -2
- data/lib/good_job/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eebb74f90c823f1b2dd3dbeeecffc6279b072d5929182c7734357ce98ebd3a1a
|
4
|
+
data.tar.gz: f0df3c322938cb34d9a5686a344db8e412a2878473ff778928006855ab8339a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a91aae2a4768af8c89c8b0e2b04898d70dbe145b8808f2e1cc60fd18dd63faafd3679ca7444abd9e6863b7991b778ee709ba8949ac791362ff850c7aca3dcb5c
|
7
|
+
data.tar.gz: e3df10dbd134f6e335938578c0050e838d2b0073a6a3d7f64a90313e70afd214e76307df146be840dc8fecfcfca32bcb4ea9671f7549573c2e0e32adb8006a7a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v4.9.2](https://github.com/bensheldon/good_job/tree/v4.9.2) (2025-03-09)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.9.1...v4.9.2)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- Quiet duplicate cron enqueue logging by pretending it was halted at before\_enqueue [\#1615](https://github.com/bensheldon/good_job/pull/1615) ([bensheldon](https://github.com/bensheldon))
|
10
|
+
|
3
11
|
## [v4.9.1](https://github.com/bensheldon/good_job/tree/v4.9.1) (2025-03-09)
|
4
12
|
|
5
13
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.9.0...v4.9.1)
|
@@ -110,8 +110,6 @@ module GoodJob # :nodoc:
|
|
110
110
|
kwargs_value.present? ? configured_job.perform_later(*args_value, **kwargs_value) : configured_job.perform_later(*args_value)
|
111
111
|
end
|
112
112
|
end
|
113
|
-
rescue ActiveRecord::RecordNotUnique
|
114
|
-
false
|
115
113
|
end
|
116
114
|
|
117
115
|
def display_properties
|
data/app/models/good_job/job.rb
CHANGED
@@ -387,7 +387,16 @@ module GoodJob
|
|
387
387
|
end
|
388
388
|
|
389
389
|
instrument_payload[:job] = job
|
390
|
-
|
390
|
+
begin
|
391
|
+
job.save!
|
392
|
+
rescue ActiveRecord::RecordNotUnique
|
393
|
+
raise unless job.cron_key
|
394
|
+
|
395
|
+
# Active Job doesn't have a clean way to cancel an enqueue for unexceptional reasons
|
396
|
+
# This is a workaround to mark it as having been halted in before_enqueue
|
397
|
+
active_job.send(:halted_callback_hook, "duplicate_cron_key", "good_job")
|
398
|
+
return false
|
399
|
+
end
|
391
400
|
|
392
401
|
CurrentThread.retried_job = job if retried
|
393
402
|
|
data/lib/good_job/adapter.rb
CHANGED
@@ -163,8 +163,10 @@ module GoodJob
|
|
163
163
|
scheduled_at: scheduled_at
|
164
164
|
)
|
165
165
|
|
166
|
-
|
167
|
-
|
166
|
+
if job
|
167
|
+
executed_locally = execute_async? && @capsule&.create_thread(job.job_state)
|
168
|
+
Notifier.notify(job.job_state) if !executed_locally && send_notify?(active_job)
|
169
|
+
end
|
168
170
|
end
|
169
171
|
|
170
172
|
job
|
data/lib/good_job/version.rb
CHANGED