startback 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e8db13b73a3b5af26bca0fb1470580eb26018c6bb35b4b0cc3501f4c7fc7a6c
4
- data.tar.gz: 2d0a35fccd22df3036f30a6d7b016e370989992b0a9615d88516db9866d4da0f
3
+ metadata.gz: c2a20858c9d0287af3cfaa8e60c6f59630f1d258de469f7c50ffe1e6529742ca
4
+ data.tar.gz: c5d3fb83ab9a7aa0b1bb6fbec2f0bfeef40b4c51c15c602d9a2bca85b17e8d26
5
5
  SHA512:
6
- metadata.gz: a39eb875292123ddf7bc30156fa1ffcaae61f0db1749fd82f2ca7f52288be84f93b7e9b95980df6cc0679f4f7558626ca5fd389d3dab1af70ed5cc9a9ad42029
7
- data.tar.gz: '087affc127493338dccfff9680dfa2946a39975847d49be99644dc89ec677fe7c23bc5f2a40b980072d9cf8a0cf11dcf4c3c07b5314970941c01e61caa01e259'
6
+ metadata.gz: ee763fb9d8be8ca1f6cc8a541b70df6b72ae982e2026b04286ec5b6a208aba31641ea8062330f7efc8d01e548bfbca408edb115678dbc6fefa707e3d98fc8f0e
7
+ data.tar.gz: ec3607dec57ff640d4b49afb147a5c6893e45844e5d53cf07e8ca26ea709341260c02f01a25bad7fc68f231e859986ce2bb0604de7e6031f59f97d1f0a06a464
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.9.1
@@ -35,6 +35,8 @@ module Startback
35
35
  class Async
36
36
  include Support::Robustness
37
37
 
38
+ CHANNEL_KEY = 'Startback::Bus::Bunny::Async::ChannelKey'
39
+
38
40
  DEFAULT_OPTIONS = {
39
41
  # (optional) The URL to use for connecting to RabbitMQ.
40
42
  url: ENV['STARTBACK_BUS_BUNNY_ASYNC_URL'],
@@ -65,11 +67,15 @@ module Startback
65
67
  try_max_times(10) do
66
68
  @bunny = ::Bunny.new(conn)
67
69
  @bunny.start
68
- @channel = @bunny.create_channel
70
+ channel
69
71
  log(:info, {op: "#{self.class.name}#connect", op_data: conn}, options[:context])
70
72
  end
71
73
  end
72
- attr_reader :channel, :options
74
+ attr_reader :options
75
+
76
+ def channel
77
+ Thread.current[CHANNEL_KEY] ||= @bunny.create_channel
78
+ end
73
79
 
74
80
  def emit(event)
75
81
  stop_errors(self, "emit", event.context) do
@@ -2,7 +2,7 @@ module Startback
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 9
5
- TINY = 0
5
+ TINY = 1
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: startback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-27 00:00:00.000000000 Z
11
+ date: 2021-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -470,7 +470,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
470
470
  - !ruby/object:Gem::Version
471
471
  version: '0'
472
472
  requirements: []
473
- rubygems_version: 3.2.22
473
+ rubygems_version: 3.2.32
474
474
  signing_key:
475
475
  specification_version: 4
476
476
  summary: Got Your Ruby Back