splitclient-rb 8.10.0.pre.rc5-java → 8.10.0.pre.rc6-java

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: e33742cc84aa62b21f01506cbea543e297c5ae727c4202099981531f91f5b7f3
4
- data.tar.gz: 1c97b3bb6bc0ad998d6c65898159b1bf1354717fc3cdebc50b66e1dadbcc702f
3
+ metadata.gz: 910b3c2fa209ff77e5f8fce756ee873d2bd7f254e450baf7e39ebc715b9f96ae
4
+ data.tar.gz: ee7b91eb9a0ccb26cb6063768b98b23fa4666650d64b72625b3f1299a14d4175
5
5
  SHA512:
6
- metadata.gz: 951df9f2ed4ced43a484b8fc4275d6e6016c0768aa33071454d147e0d71a2edc241538d355128d2896092608f0348ed94d559d49bc1ba389cca51034ea98da42
7
- data.tar.gz: 68d8c5b96ef83566ff69951f29b13a83d091b7259ed806a9d8b4fb8e0f2096aa4b7ce5870c871b02d511fffbe840b04171ec6ce8d0b195274b8aeeafc24fa4c5
6
+ metadata.gz: 1475a505e93473704d0cd65b8b4c5575072c2a67bec47c79f31f14b4f7846f90628a7779d15c1385a653c9802021afeb70d12a6895e0a9ec1ff84e9464fecf8e
7
+ data.tar.gz: 461ef75703b0bdb976ef091f92e3df0148cef5ee5ccfbed80f6f43dfab8c5f3112bd6f3eae47353942aa501173dadd395c2fbac1b686f688b119802b466894a2
@@ -38,7 +38,7 @@ module SplitIoClient
38
38
 
39
39
  def close(status = nil)
40
40
  unless connected?
41
- log_if_debug('SSEClient already disconected.', 3)
41
+ @config.logger.debug('SSEClient already disconected.')
42
42
  return
43
43
  end
44
44
 
@@ -76,17 +76,16 @@ module SplitIoClient
76
76
 
77
77
  def connect_thread(latch)
78
78
  @config.threads[:connect_stream] = Thread.new do
79
- log_if_debug('Starting connect_stream thread ...', 2)
79
+ @config.logger.info('Starting connect_stream thread ...')
80
80
  new_status = connect_stream(latch)
81
81
  push_status(new_status)
82
- log_if_debug('connect_stream thread finished.', 2)
82
+ @config.logger.info('connect_stream thread finished.')
83
83
  end
84
84
  end
85
85
 
86
86
  def connect_stream(latch)
87
87
  return Constants::PUSH_NONRETRYABLE_ERROR unless socket_write(latch)
88
88
  while connected? || @first_event.value
89
- log_if_debug("Inside coonnect_stream while loop.", 3)
90
89
  if IO.select([@socket], nil, nil, @read_timeout)
91
90
  begin
92
91
  partial_data = @socket.readpartial(10_000)
@@ -94,38 +93,37 @@ module SplitIoClient
94
93
 
95
94
  raise 'eof exception' if partial_data == :eof
96
95
  rescue IO::WaitReadable => e
97
- log_if_debug("SSE client transient error: #{e.inspect}", 1)
96
+ @config.logger.debug("SSE client IO::WaitReadable transient error: #{e.inspect}")
97
+ IO.select([@socket], nil, nil, @read_timeout)
98
+ retry
99
+ rescue Errno::EAGAIN => e
100
+ @config.logger.debug("SSE client transient error: #{e.inspect}")
98
101
  IO.select([@socket], nil, nil, @read_timeout)
99
102
  retry
100
103
  rescue Errno::ETIMEDOUT => e
101
- log_if_debug("SSE read operation timed out!: #{e.inspect}", 3)
104
+ @config.logger.error("SSE read operation timed out!: #{e.inspect}")
102
105
  return Constants::PUSH_RETRYABLE_ERROR
103
106
  rescue EOFError => e
104
- log_if_debug("SSE read operation EOF Exception!: #{e.inspect}", 3)
107
+ @config.logger.error("SSE read operation EOF Exception!: #{e.inspect}")
105
108
  raise 'eof exception'
106
- rescue Errno::EAGAIN => e
107
- log_if_debug("SSE client transient error: #{e.inspect}", 1)
108
- IO.select([@socket], nil, nil, @read_timeout)
109
- retry
110
109
  rescue Errno::EBADF, IOError => e
111
- log_if_debug("SSE read operation EBADF or IOError: #{e.inspect}", 3)
112
- return nil
110
+ @config.logger.error("SSE read operation EBADF or IOError: #{e.inspect}")
111
+ return Constants::PUSH_RETRYABLE_ERROR
113
112
  rescue StandardError => e
114
- log_if_debug("SSE read operation StandardError: #{e.inspect}", 3)
113
+ @config.logger.error("SSE read operation StandardError: #{e.inspect}")
115
114
  return nil if ENV['SPLITCLIENT_ENV'] == 'test'
116
115
 
117
- log_if_debug("Error reading partial data: #{e.inspect}", 3)
116
+ @config.logger.error("Error reading partial data: #{e.inspect}")
118
117
  return Constants::PUSH_RETRYABLE_ERROR
119
118
  end
120
119
  else
121
- # Timeout occurred, no data available
122
- log_if_debug("SSE read operation timed out, no data available.", 3)
120
+ @config.logger.error("SSE read operation timed out, no data available.")
123
121
  return Constants::PUSH_RETRYABLE_ERROR
124
122
  end
125
123
 
126
124
  process_data(partial_data)
127
125
  end
128
- log_if_debug("SSE read operation exited: #{connected?}", 3)
126
+ @config.logger.info("SSE read operation exited: #{connected?}")
129
127
 
130
128
  nil
131
129
  end
@@ -136,7 +134,7 @@ module SplitIoClient
136
134
  @socket.puts(build_request(@uri))
137
135
  true
138
136
  rescue StandardError => e
139
- log_if_debug("Error during connecting to #{@uri.host}. Error: #{e.inspect}", 3)
137
+ @config.logger.error("Error during connecting to #{@uri.host}. Error: #{e.inspect}")
140
138
  latch.count_down
141
139
  false
142
140
  end
@@ -179,9 +177,8 @@ module SplitIoClient
179
177
  IO.select(nil, [ssl_socket])
180
178
  retry
181
179
  end
182
-
183
180
  return ssl_socket
184
- # return ssl_socket.connect
181
+
185
182
  rescue Exception => e
186
183
  @config.logger.error("socket connect error: #{e.inspect}")
187
184
  return nil
@@ -192,7 +189,7 @@ module SplitIoClient
192
189
  end
193
190
 
194
191
  def process_data(partial_data)
195
- log_if_debug("Event partial data: #{partial_data}", 1)
192
+ @config.logger.debug("Event partial data: #{partial_data}")
196
193
  return if partial_data.nil? || partial_data == KEEP_ALIVE_RESPONSE
197
194
 
198
195
  events = @event_parser.parse(partial_data)
@@ -210,7 +207,7 @@ module SplitIoClient
210
207
  req << "SplitSDKMachineName: #{@config.machine_name}\r\n"
211
208
  req << "SplitSDKClientKey: #{@api_key.split(//).last(4).join}\r\n" unless @api_key.nil?
212
209
  req << "Cache-Control: no-cache\r\n\r\n"
213
- log_if_debug("Request info: #{req}", 1)
210
+ @config.logger.debug("Request info: #{req}")
214
211
  req
215
212
  end
216
213
 
@@ -248,19 +245,6 @@ module SplitIoClient
248
245
  @config.logger.debug("Pushing new sse status: #{status}")
249
246
  @status_queue.push(status)
250
247
  end
251
-
252
- def log_if_debug(text, level)
253
- if @config.debug_enabled
254
- case level
255
- when 1
256
- @config.logger.debug(text)
257
- when 2
258
- @config.logger.info(text)
259
- else
260
- @config.logger.error(text)
261
- end
262
- end
263
- end
264
248
  end
265
249
  end
266
250
  end
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '8.10.0-rc5'
2
+ VERSION = '8.10.0-rc6'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splitclient-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.10.0.pre.rc5
4
+ version: 8.10.0.pre.rc6
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-11-07 00:00:00.000000000 Z
10
+ date: 2025-11-12 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: allocation_stats