protobuf-nats 0.10.4 → 0.10.6

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: 1c0f99feffeb6c233028cc0f6ef5a3a3193e8e5974e69b31a45ef0779e240d57
4
- data.tar.gz: a296bec5b07fb71d713a5e92f3de90b11f19f1f63c929649cbec2f666be7a9b7
3
+ metadata.gz: 7761313e59a23ac96ece4459f1f5a681e6f1d9849a9069a5a60cd7a95c866d23
4
+ data.tar.gz: 192975bee97ee5d132515158e66f2081970c24071f1d89b73f878e2734736ac0
5
5
  SHA512:
6
- metadata.gz: c792b9b7efc00fa9e430e63ac84cf9f36586475a84007a47df426fd42b16da5cb6eaf419ba0badc1e05b61a049378322c2f70d7b9eddc17392bedd58c8702386
7
- data.tar.gz: 9438620b728b973db2e5a343052ad033d7cc78bb10c48c0b3c2d676114e8f2af8b2dd94fbfac4d39eed0f17e643b574cd0c86b50ecbd7722e0d5cc29c868d060
6
+ metadata.gz: a8cf08359fd214e7590a71e04c208505720f943020b7c4d028b5996734e24d1db0c67d4625f03c74d270f0cbcd2011f5ba673a6126ff7bed255e47a653f260e9
7
+ data.tar.gz: 4cf1c1332d8b9fb28e2d2e08fe65e2f205539751f08dde27ce1cb6e9de416ec1d3263ecd85fc6bac8cf44926c1e9758ce2ed75ebb6a4283ed1e75ede6a388587
@@ -39,7 +39,7 @@ module Protobuf
39
39
  yaml_config = {}
40
40
  config_path = ENV["PROTOBUF_NATS_CONFIG_PATH"] || ::File.join("config", "protobuf_nats.yml")
41
41
  absolute_config_path = ::File.expand_path(config_path)
42
- if ::File.exists?(absolute_config_path)
42
+ if ::File.exist?(absolute_config_path)
43
43
  # Psych 4 and newer requires unsafe_load_file in order for aliases to be used
44
44
  yaml_config = if ::YAML.respond_to?(:unsafe_load_file)
45
45
  ::YAML.unsafe_load_file(absolute_config_path)[env]
@@ -56,6 +56,10 @@ module Protobuf
56
56
  ::ActiveSupport::Notifications.instrument("server.thread_pool_execution_delay.protobuf-nats",
57
57
  (processed_at - enqueued_at) * MILLISECOND)
58
58
 
59
+ ::ActiveSupport::Notifications.instrument("server.thread_pool_enqueued_size.protobuf-nats", thread_pool.enqueued_size)
60
+ ::ActiveSupport::Notifications.instrument("server.thread_pool_max_size.protobuf-nats", thread_pool.max_size)
61
+ ::ActiveSupport::Notifications.instrument("server.thread_pool_running_size.protobuf-nats", thread_pool.size)
62
+
59
63
  # Process request.
60
64
  response_data = handle_request(request_data, 'server' => @server)
61
65
  # Publish response.
@@ -22,10 +22,18 @@ module Protobuf
22
22
  supervise_workers
23
23
  end
24
24
 
25
+ def enqueued_size
26
+ @queue.size
27
+ end
28
+
25
29
  def full?
26
30
  @active_work >= @max_size
27
31
  end
28
32
 
33
+ def max_size
34
+ @max_size
35
+ end
36
+
29
37
  # This method is not thread safe by design since our IO model is a single producer thread
30
38
  # with multiple consumer threads.
31
39
  def push(&work_cb)
@@ -1,5 +1,5 @@
1
1
  module Protobuf
2
2
  module Nats
3
- VERSION = "0.10.4"
3
+ VERSION = "0.10.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf-nats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.4
4
+ version: 0.10.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Dewitt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-21 00:00:00.000000000 Z
11
+ date: 2024-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  - !ruby/object:Gem::Version
206
206
  version: '0'
207
207
  requirements: []
208
- rubygems_version: 3.2.28
208
+ rubygems_version: 3.5.17
209
209
  signing_key:
210
210
  specification_version: 4
211
211
  summary: ruby-protobuf client/server for nats