eventboss 1.9.7 → 1.9.9

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: 32c271ea01136f0e14f98ae6163f543f58edd8d45dd7cc0aa30c7facfda6fb44
4
- data.tar.gz: 7c45094a9e1e205f90759bcf3f11a261cafcef2b9e1e51e65c3948bad9b3ae50
3
+ metadata.gz: c9bc3dee10dd3ee71827ff3f1e664064f6a08ba0a27d3901591abb5d5519ebfa
4
+ data.tar.gz: 624ecc46e585fd1456e04008b528d1f852820991464ace819d48efe271e352e6
5
5
  SHA512:
6
- metadata.gz: a2e07d2f3c12b4e3f5c5c5c319b9f6663c498b8e398e6da7e955fcec98372601d3f0365d60d9dd32f7ae891d79bc5c6d824fb574f1a85e6d710013106516f434
7
- data.tar.gz: 12884bb40cfd6ee48b294e10c4b92ab2cb230ee32274dc3d271a4f348c9bbf174d7a72ed455f314034af8e9579ae97e9e88d67b44a82b47c526b4bfb7b2da52e
6
+ metadata.gz: 4fd77a869314c810afc8c75aeb226f1d2a0c39b13f5a90bb465557673bfaa71ec44760e577102faf42da5ef503a31e4ceef964ef4a680a4052eb527fbd77d0a7
7
+ data.tar.gz: c2b43231b734e917cd44ae1d68807181f9ea71b6f520f6525cc04774082a1b12431d5bb3cca05e1e032ae91c7a2f75ef2400eb50792483dd58ad43a97f88e7ad
@@ -9,9 +9,9 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  strategy:
11
11
  matrix:
12
- ruby-version: ["3.0", "3.1", "3.2"]
12
+ ruby-version: ["3.3", "3.4"]
13
13
  steps:
14
- - uses: actions/checkout@v4
14
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15
15
  - name: Set up Ruby
16
16
  uses: ruby/setup-ruby@v1
17
17
  with:
@@ -11,7 +11,7 @@ jobs:
11
11
  packages: write
12
12
  steps:
13
13
  - name: Check out repository
14
- uses: actions/checkout@v4
14
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15
15
 
16
16
  - name: Set up Ruby
17
17
  uses: ruby/setup-ruby@v1
@@ -14,9 +14,9 @@ jobs:
14
14
  runs-on: ubuntu-latest
15
15
  strategy:
16
16
  matrix:
17
- ruby-version: ["3.0", "3.1", "3.2"]
17
+ ruby-version: ["3.3", "3.4"]
18
18
  steps:
19
- - uses: actions/checkout@v4
19
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20
20
  - name: Set up Ruby
21
21
  # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
22
22
  uses: ruby/setup-ruby@v1
data/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+
8
+ ## [1.9.9]
9
+
10
+ ### Fixed
11
+ - Exit cleanly on SIGTERM received during application boot, before the runner installs its graceful signal handling, so a shutdown mid-boot is no longer reported as a crash
12
+
13
+ ## [1.9.8]
14
+
15
+ - Improve performance by reusing SNS client
16
+
7
17
  ## [1.9.7]
8
18
 
9
19
  - Fix undefined method 'set_data' for nil span in Sentry integration
data/lib/eventboss/cli.rb CHANGED
@@ -30,6 +30,8 @@ module Eventboss
30
30
  end
31
31
 
32
32
  def run
33
+ setup_boot_signal_traps
34
+
33
35
  boot_system
34
36
 
35
37
  Eventboss.logger.info('Starting eventboss...')
@@ -39,6 +41,15 @@ module Eventboss
39
41
 
40
42
  private
41
43
 
44
+ # Booting the application (e.g. loading Rails) can take long enough that a
45
+ # termination signal arrives before Runner installs its graceful signal
46
+ # handling. Without a handler the process dies non-gracefully and is
47
+ # reported as a crash. Until Runner takes over, exit cleanly on SIGTERM so
48
+ # a shutdown mid-boot is not treated as a failure.
49
+ def setup_boot_signal_traps
50
+ Signal.trap('SIGTERM') { exit 0 }
51
+ end
52
+
42
53
  def boot_system
43
54
  require 'rails'
44
55
  if ::Rails::VERSION::MAJOR < 4
@@ -39,25 +39,22 @@ module Eventboss
39
39
  end
40
40
 
41
41
  def backend
42
- if configured?
43
- options = {
44
- region: configuration.eventboss_region,
45
- }
42
+ @backend ||=
43
+ if configured?
44
+ options = {
45
+ region: configuration.eventboss_region
46
+ }
46
47
 
47
- unless configuration.eventboss_use_default_credentials
48
- options[:credentials] = credentials
49
- end
48
+ options[:credentials] = credentials unless configuration.eventboss_use_default_credentials
50
49
 
51
- if configuration.aws_sns_endpoint
52
- options[:endpoint] = configuration.aws_sns_endpoint
53
- end
50
+ options[:endpoint] = configuration.aws_sns_endpoint if configuration.aws_sns_endpoint
54
51
 
55
- Aws::SNS::Client.new(options)
56
- elsif configuration.raise_on_missing_configuration
57
- raise NotConfigured, 'Eventboss is not configured.'
58
- else
59
- Mock.new
60
- end
52
+ Aws::SNS::Client.new(options)
53
+ elsif configuration.raise_on_missing_configuration
54
+ raise NotConfigured, 'Eventboss is not configured.'
55
+ else
56
+ Mock.new
57
+ end
61
58
  end
62
59
 
63
60
  def credentials
@@ -1,3 +1,3 @@
1
1
  module Eventboss
2
- VERSION = "1.9.7"
2
+ VERSION = "1.9.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventboss
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.7
4
+ version: 1.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - AirHelp
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
- rubygems_version: 3.6.9
191
+ rubygems_version: 4.0.16
192
192
  specification_version: 4
193
193
  summary: Eventboss Ruby Client.
194
194
  test_files: []