stack-service-base 0.0.16 → 0.0.17

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: fd4302c251791282d66f81403f63b1be721e49c2be7cc308cfdf06bca6fe59ad
4
- data.tar.gz: 6089912f301d056687b796b304bb7feb191b1de0219e356c41e32f1146ffaf90
3
+ metadata.gz: 19fe497cb600a2f7618d3ae4ec8cf25862381804c0b51c2e73096f9ed3493e40
4
+ data.tar.gz: d9d9c062161159b12895ebb3aa143d08b80cff20de829a2c85b68392647c395c
5
5
  SHA512:
6
- metadata.gz: a480a26df7ddb751c7b411c21be4c143caad04083e01167377f5b9a9c8171dc8c27046b91c99e192d0b558ef2c80f6eed89a066118893c15629455f46ce7dfc6
7
- data.tar.gz: 404695c0840edba9398d0b5e5f9be67dc4aa152669adf5de85fddd5ba489fdb73358882f270185a83c835332a4ac2a82e89088da336560e7163854a6c9d05a51
6
+ metadata.gz: 41303c5e2005b8669959f8fbfc29d8318da4101a9a9b166a49d7fb768cad82c598731801b2cf892f1d3323bd682950397c751ead4ab1184ccea019393934602f
7
+ data.tar.gz: a3337e079cc9053b267b955e472b9994e90062e1254ab27ae2d857c0aa3c55307214492f945355c03d53c1763246485082af97fc40ad9adbdc64dd5a63fe69ad
@@ -7,21 +7,29 @@ class FiberConnectionPool < Sequel::ConnectionPool
7
7
  POOL_SIZE = 10
8
8
 
9
9
  def log(msg)
10
+ otl_current_span{ |span|
11
+ span.add_event("Fiber:log", attributes:{
12
+ event: 'Success', message: msg
13
+ }.transform_keys(&:to_s) )
14
+ }
15
+
10
16
  return if defined? PERFORMANCE
11
17
  $stdout.puts "F:#{Fiber.current.__id__} : T:#{Thread.current.__id__} : A:#{self.__id__} : #{msg}"
12
18
  # LOGGER.debug :fiber_pool, msg
13
19
  end
14
20
 
15
21
  def initialize(db, opts = OPTS)
16
- super
17
- @allocator = ->() {
18
- make_new(:default).tap { |conn|
19
- log "new connection (fiber pool) #{conn}"
22
+ otl_span "FiberConnectionPool.initialize" do |span|
23
+ super
24
+ @allocator = ->() {
25
+ make_new(:default).tap { |conn|
26
+ log "new connection (fiber pool) #{conn}"
27
+ }
20
28
  }
21
- }
22
- @stock = []
23
- @acquired = {}
24
- @sp = Async::Semaphore.new opts[:max_connections] || POOL_SIZE
29
+ @stock = []
30
+ @acquired = {}
31
+ @sp = Async::Semaphore.new opts[:max_connections] || POOL_SIZE
32
+ end
25
33
  end
26
34
 
27
35
  def is_valid_connection?(conn)
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module StackServiceBase
2
2
  class Base
3
- VERSION = '0.0.16'
3
+ VERSION = '0.0.17'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stack-service-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''