tanker-core 4.2.1.alpha.3 → 4.2.1.alpha.6

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: e58e960b9a509ae81ae1846d7bfb6c5b19a1f3c6c9f90a960970cc31ad059afe
4
- data.tar.gz: 388edaccc0f600a0ae0daf6e0b47d4e0cd5ebc3b54442b465e0b65566b817016
3
+ metadata.gz: d1e7590a93091e31d8b6b8f4fcdda0aeacde9cd706ea5086e059c40bd5e29315
4
+ data.tar.gz: c827fae3510a062af2fe3025def64338f8a68362c0c004d43ab24ac2533c5a9b
5
5
  SHA512:
6
- metadata.gz: 7425259ff75b5a0a0d7b6a21904406091cbd810dcc46d4dfd9bb865396d1d6ef03456268caf2527629457b0494b10b6097616cc9e89137372d2f698d1a4b72d9
7
- data.tar.gz: 1098ed103a76eb701e6eea2007b57938cf28ed0e6e9d3b35a9b75c2c2282181e77df82debfd40b1d9311934f67bdc2e06140f609687b5156c313eb0eeb74fe7c
6
+ metadata.gz: 48886a98a73067c2ed2b1f4c0e374a23418bc5f87d38e20538ee0393f4022bc6c04870a35d9d07e7b00074357a32ba83c9f39bacd816235cd2539161b1df861f
7
+ data.tar.gz: e6dfb66aae5688317e42b7cf3ead466c589ecfe55b2d99429bd279066aa1f67b33b0c0238c2ba1a5a32575264e4ed5eff8a105ee5708504e5a9dfe7ce076f706
@@ -5,14 +5,14 @@ require 'tanker/core/http'
5
5
  module Tanker
6
6
  module ForkHook
7
7
  def _fork(*args)
8
- puts "### TANKER-CORE BEFORE FORK HOOK"
8
+ puts "### PID=#{Process.pid} TANKER-CORE BEFORE FORK HOOK"
9
9
  CTanker.tanker_before_fork
10
10
  Http::ThreadPool.before_fork
11
11
 
12
12
  res = super
13
13
 
14
14
  CTanker.tanker_after_fork
15
- puts "### TANKER-CORE AFTER FORK HOOK"
15
+ puts "### PID=#{Process.pid} TANKER-CORE AFTER FORK HOOK"
16
16
  res
17
17
  end
18
18
  prepend_features(Process.singleton_class)
@@ -85,6 +85,7 @@ module Tanker
85
85
  @queue = nil
86
86
 
87
87
  def self.init
88
+ puts "### PID=#{Process.pid} TANKER-CORE HTTP THREADPOOL INIT"
88
89
  # Queue is a concurrent queue in Ruby
89
90
  @queue = Queue.new
90
91
  @http_thread_pool = THREAD_POOL_SIZE.times do
@@ -95,6 +96,7 @@ module Tanker
95
96
  end
96
97
 
97
98
  def self.thread_loop
99
+ puts "### PID=#{Process.pid} TANKER-CORE HTTP THREADPOOL WORKER LOOP STARTED"
98
100
  loop do
99
101
  work = @queue.pop
100
102
  work.call
@@ -102,11 +104,13 @@ module Tanker
102
104
  end
103
105
 
104
106
  def self.push(proc)
107
+ puts "### PID=#{Process.pid} TANKER-CORE HTTP THREADPOOL PUSH"
105
108
  init if @queue.nil?
106
109
  @queue << proc
107
110
  end
108
111
 
109
112
  def self.before_fork
113
+ puts "### PID=#{Process.pid} TANKER-CORE HTTP THREADPOOL BEFORE FORK"
110
114
  @http_thread_pool = nil
111
115
  @queue = nil
112
116
  end
@@ -179,6 +183,7 @@ module Tanker
179
183
  end
180
184
 
181
185
  def send_request(crequest, _cdata)
186
+ puts "### PID=#{Process.pid} TANKER-CORE HTTP SEND_REQUEST CALLED"
182
187
  request = HttpRequest.new(crequest:)
183
188
  ThreadPool.push(proc do
184
189
  process_request request
@@ -23,6 +23,8 @@ module Tanker
23
23
  end
24
24
 
25
25
  def initialize(options)
26
+ puts "### PID=#{Process.pid} TANKER-CORE initialize, about to call CTanker.tanker_init"
27
+
26
28
  # tanker_init is not called globally to avoid potential logs at global scope
27
29
  # some frameworks like to pre-execute statements at global scope and then fork, this fork can
28
30
  # interact badly with the threads used in the log handler, so never call Tanker at global scope
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Tanker
4
4
  class Core
5
- VERSION = '4.2.1.alpha.3'
5
+ VERSION = '4.2.1.alpha.6'
6
6
 
7
7
  def self.native_version
8
8
  CTanker.tanker_version_string
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tanker-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.1.alpha.3
4
+ version: 4.2.1.alpha.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanker team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-13 00:00:00.000000000 Z
11
+ date: 2024-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday