good_job 4.9.2 → 4.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eebb74f90c823f1b2dd3dbeeecffc6279b072d5929182c7734357ce98ebd3a1a
4
- data.tar.gz: f0df3c322938cb34d9a5686a344db8e412a2878473ff778928006855ab8339a1
3
+ metadata.gz: 11143bd2b5c2841e11678c93f3632485b0bc9dd23927454c07ffc6d1e6b0abea
4
+ data.tar.gz: 5e2681807571802f1ee335fcc689f27e2aba2a13fe4cc1d633813d1bd949c0cb
5
5
  SHA512:
6
- metadata.gz: a91aae2a4768af8c89c8b0e2b04898d70dbe145b8808f2e1cc60fd18dd63faafd3679ca7444abd9e6863b7991b778ee709ba8949ac791362ff850c7aca3dcb5c
7
- data.tar.gz: e3df10dbd134f6e335938578c0050e838d2b0073a6a3d7f64a90313e70afd214e76307df146be840dc8fecfcfca32bcb4ea9671f7549573c2e0e32adb8006a7a
6
+ metadata.gz: 92b3e5bc089532cac4fe541f1e265915e0ca480f0067e2f1662e2f17d40f8af6c9e983d716fc4405a412dfd86d913c16132654c879b368055ee060f0a93336ce
7
+ data.tar.gz: a2fe5af27f4dd8ee1afe6ad312d3218d3eff2b8776f87d3d9047db13119f2a9f5d53f9866aa51e3cacb6146f306a4127fc55bf1b503b80c1be7754a356d275d3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [v4.9.3](https://github.com/bensheldon/good_job/tree/v4.9.3) (2025-03-10)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v4.9.2...v4.9.3)
6
+
7
+ **Closed issues:**
8
+
9
+ - perform\_job.good\_job notification for successful jobs has error\_event: :discarded [\#1609](https://github.com/bensheldon/good_job/issues/1609)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Fix instrumentation of "perform\_job.good\_job" event [\#1616](https://github.com/bensheldon/good_job/pull/1616) ([bensheldon](https://github.com/bensheldon))
14
+
3
15
  ## [v4.9.2](https://github.com/bensheldon/good_job/tree/v4.9.2) (2025-03-09)
4
16
 
5
17
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v4.9.1...v4.9.2)
@@ -9,7 +9,7 @@ module GoodJob
9
9
  attr_reader :handled_error
10
10
  # @return [Exception, nil]
11
11
  attr_reader :unhandled_error
12
- # @return [String, nil]
12
+ # @return [Symbol, nil]
13
13
  attr_reader :error_event
14
14
  # @return [Boolean, nil]
15
15
  attr_reader :unexecutable
@@ -642,8 +642,9 @@ module GoodJob
642
642
  value = nil
643
643
  end
644
644
  handled_error ||= current_thread.error_on_retry || current_thread.error_on_discard
645
-
646
- error_event = if handled_error == current_thread.error_on_discard
645
+ error_event = if !handled_error
646
+ nil
647
+ elsif handled_error == current_thread.error_on_discard
647
648
  :discarded
648
649
  elsif handled_error == current_thread.error_on_retry
649
650
  :retried
@@ -655,6 +656,7 @@ module GoodJob
655
656
 
656
657
  instrument_payload.merge!(
657
658
  value: value,
659
+ error: handled_error,
658
660
  handled_error: handled_error,
659
661
  retried: current_thread.retried_job.present?,
660
662
  error_event: error_event
@@ -669,7 +671,11 @@ module GoodJob
669
671
  :unhandled
670
672
  end
671
673
 
672
- instrument_payload[:unhandled_error] = e
674
+ instrument_payload.merge!(
675
+ error: e,
676
+ unhandled_error: e,
677
+ error_event: error_event
678
+ )
673
679
  ExecutionResult.new(value: nil, unhandled_error: e, error_event: error_event)
674
680
  end
675
681
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module GoodJob
4
4
  # GoodJob gem version.
5
- VERSION = '4.9.2'
5
+ VERSION = '4.9.3'
6
6
 
7
7
  # GoodJob version as Gem::Version object
8
8
  GEM_VERSION = Gem::Version.new(VERSION)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: good_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.9.2
4
+ version: 4.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Sheldon
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-03-09 00:00:00.000000000 Z
10
+ date: 2025-03-10 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activejob