ch_connect 0.2.1 → 0.2.2

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: 50be174654df1074c817ad1cf895a206bc165452dda7fc47b4b6209aa622565f
4
- data.tar.gz: e0b9467ebc013a701653ff16c277651e0e81fac81d225ea6d9cc5f2d64b5bb57
3
+ metadata.gz: 1975451cfb97c84b89c7153fcd18a8057477ea5fd3a13a21a0b11463343b124a
4
+ data.tar.gz: e5182056af628032f2faf8b8f17732870d8c89e6d16fdddc1ccbf70742cfc649
5
5
  SHA512:
6
- metadata.gz: 27992acbdb31511f7838201941f09f36587f2786e2df1b0bb000acc308405fd93d494955c202d0c732c2eace0bde0b0c5ffb106887f5ac9321c028e09d832384
7
- data.tar.gz: 6e64f8873f628a856e21f199462c9eef435216ef0c8ea72f7f959a744e10115d85b63cf51f0700babd7919a8f8eb514f13557adc54077a14b01d5e49e1c2a753
6
+ metadata.gz: 64540c1ebc919c74a9f69c738fa47d8d81eab54b39e4b862a3b9651aa0763563cd6cc362739008a7e1020fb0c608f902fcd97e56fd60971b3661d2525958cc33
7
+ data.tar.gz: 2d064557ed0ce3c84e3e9b0f2ad27b1d05c660d3312842d6ece5ce6e3a56329d08829bd4abdeda06cc2fa4570d86b2ccd7eefcec91037c699387bb60de6a4ebb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## [0.2.2] - 2026-05-06
4
+
5
+ - Added configurable `keep_alive_timeout` for idle persistent connections (default: 8s) ([#7](https://github.com/kukicola/ch_connect/pull/7))
6
+
3
7
  ## [0.2.1] - 2026-02-08
4
8
 
5
9
  - Added automatic retries on connection errors with configurable `max_retries` (default: 3) ([#6](https://github.com/kukicola/ch_connect/pull/6))
data/README.md CHANGED
@@ -177,6 +177,7 @@ response = conn.query(
177
177
  | `connection_timeout` | `5` | Connection timeout in seconds |
178
178
  | `read_timeout` | `60` | Read timeout in seconds |
179
179
  | `write_timeout` | `60` | Write timeout in seconds |
180
+ | `keep_alive_timeout` | `8` | Idle persistent connection timeout in seconds |
180
181
  | `pool_size` | `100` | Connection pool size |
181
182
  | `pool_timeout` | `5` | Pool checkout timeout in seconds |
182
183
  | `max_retries` | `3` | Max retry attempts on connection errors (0 to disable) |
@@ -22,6 +22,7 @@ module ChConnect
22
22
  connection_timeout: 5,
23
23
  read_timeout: 60,
24
24
  write_timeout: 60,
25
+ keep_alive_timeout: 8,
25
26
  pool_size: 100,
26
27
  pool_timeout: 5,
27
28
  max_retries: 3,
@@ -37,11 +38,12 @@ module ChConnect
37
38
  # @return [Integer] Connection timeout in seconds
38
39
  # @return [Integer] Read timeout in seconds
39
40
  # @return [Integer] Write timeout in seconds
41
+ # @return [Integer] Keep-alive timeout for idle persistent connections in seconds
40
42
  # @return [Integer] Connection pool size
41
43
  # @return [Integer] Pool checkout timeout in seconds
42
44
  # @return [Integer] Max retry attempts on connection errors
43
45
  # @return [#instrument] Instrumenter for query instrumentation
44
- attr_accessor :scheme, :host, :port, :database, :username, :password, :connection_timeout, :read_timeout, :write_timeout, :pool_size, :pool_timeout, :max_retries, :instrumenter
46
+ attr_accessor :scheme, :host, :port, :database, :username, :password, :connection_timeout, :read_timeout, :write_timeout, :keep_alive_timeout, :pool_size, :pool_timeout, :max_retries, :instrumenter
45
47
 
46
48
  # Creates a new configuration instance.
47
49
  #
@@ -55,6 +57,7 @@ module ChConnect
55
57
  # @option params [Integer] :connection_timeout connection timeout in seconds (default: 5)
56
58
  # @option params [Integer] :read_timeout read timeout in seconds (default: 60)
57
59
  # @option params [Integer] :write_timeout write timeout in seconds (default: 60)
60
+ # @option params [Integer] :keep_alive_timeout idle persistent connection timeout in seconds (default: 8)
58
61
  # @option params [Integer] :pool_size connection pool size (default: 100)
59
62
  # @option params [Integer] :pool_timeout pool checkout timeout (default: 5)
60
63
  # @option params [Integer] :max_retries max retry attempts on connection errors (default: 3)
@@ -19,7 +19,8 @@ module ChConnect
19
19
  timeout: {
20
20
  connect_timeout: config.connection_timeout,
21
21
  read_timeout: config.read_timeout,
22
- write_timeout: config.write_timeout
22
+ write_timeout: config.write_timeout,
23
+ keep_alive_timeout: config.keep_alive_timeout
23
24
  },
24
25
  pool_options: {
25
26
  max_connections_per_origin: config.pool_size,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ChConnect
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ch_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karol Bąk