good_job 3.7.1 → 3.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/app/models/good_job/execution.rb +8 -1
- data/app/models/good_job/job.rb +1 -1
- 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: 820584e338535d72bf53a7e41718998ee39f718a9b77bc20a5a382b4deb7a8d0
|
4
|
+
data.tar.gz: a9a8285fce5d8a7345ce22903f24dafc9217dc853a93161fad6e7df1efede5b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a52184bd60ba084f42949096149c5b85defa7db032b61aedb3204d125cbc0a84d8d39dcba6316c49ad7f0a6e23c41109b12fd9f3dc9d1df2eeb86b7c12c3268
|
7
|
+
data.tar.gz: 54868876aefebb9668ee83b900b123c5ce512bd6b805cd6f005dbb9a60573b947b42d559ae1608b624dd21a4f70a8379ba3ad1eacc1f2f293ec3925c77fed913
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v3.7.2](https://github.com/bensheldon/good_job/tree/v3.7.2) (2022-12-12)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.7.1...v3.7.2)
|
6
|
+
|
7
|
+
**Closed issues:**
|
8
|
+
|
9
|
+
- Unable to discard failed jobs which crashed with `ActiveJob::DeserializationError` [\#770](https://github.com/bensheldon/good_job/issues/770)
|
10
|
+
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- Ignore ActiveJob::DeserializationError when discarding jobs [\#771](https://github.com/bensheldon/good_job/pull/771) ([nickcampbell18](https://github.com/nickcampbell18))
|
14
|
+
- Bump rubocop from 1.39.0 to 1.40.0 [\#769](https://github.com/bensheldon/good_job/pull/769) ([dependabot[bot]](https://github.com/apps/dependabot))
|
15
|
+
|
3
16
|
## [v3.7.1](https://github.com/bensheldon/good_job/tree/v3.7.1) (2022-12-12)
|
4
17
|
|
5
18
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.7.0...v3.7.1)
|
@@ -316,9 +316,16 @@ module GoodJob
|
|
316
316
|
self.class.unscoped.unfinished.owns_advisory_locked.exists?(id: id)
|
317
317
|
end
|
318
318
|
|
319
|
-
|
319
|
+
# Build an ActiveJob instance and deserialize the arguments, using `#active_job_data`.
|
320
|
+
#
|
321
|
+
# @param ignore_deserialization_errors [Boolean]
|
322
|
+
# Whether to ignore ActiveJob::DeserializationError when deserializing the arguments.
|
323
|
+
# This is most useful if you aren't planning to use the arguments directly.
|
324
|
+
def active_job(ignore_deserialization_errors: false)
|
320
325
|
ActiveJob::Base.deserialize(active_job_data).tap do |aj|
|
321
326
|
aj.send(:deserialize_arguments_if_needed)
|
327
|
+
rescue ActiveJob::DeserializationError
|
328
|
+
raise unless ignore_deserialization_errors
|
322
329
|
end
|
323
330
|
end
|
324
331
|
|
data/app/models/good_job/job.rb
CHANGED
@@ -206,7 +206,7 @@ module GoodJob
|
|
206
206
|
def discard_job(message)
|
207
207
|
with_advisory_lock do
|
208
208
|
execution = head_execution(reload: true)
|
209
|
-
active_job = execution.active_job
|
209
|
+
active_job = execution.active_job(ignore_deserialization_errors: true)
|
210
210
|
|
211
211
|
raise ActionForStateMismatchError if execution.finished_at.present?
|
212
212
|
|
data/lib/good_job/version.rb
CHANGED