splitclient-rb 8.3.2.pre.rc1 → 8.3.2.pre.rc2

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: d8499a9c444cca9d65f9fc68c76f6072a2457d53c4dbf6cb0b17ee719412f79f
4
- data.tar.gz: 5275c99f99855c1959c6dac21a0a9060ca0dbde7b579b6ea503ecaf1e4af92bf
3
+ metadata.gz: 3e0fe5d6b573015bd83ed8d8c9d2a50d61f312d436b36b166420e20fa4ea6541
4
+ data.tar.gz: ab4003f1bb7ec13437da9804326075ae8d71ee0a613e6037c737076a3b8d45c1
5
5
  SHA512:
6
- metadata.gz: cfcb9bfaab059299bedf42b8c9e4b92593b04d32963c2207a62bb19665695f2bfaf685064d29a25b1ab107836e534158e6a07feb787a834073ab7c7718072176
7
- data.tar.gz: 695324cac37fa3c1ab917d93dfe182be081646c7ad4f93f0430cdabf172fe2339647df26ce7330e70987ce9e9fa864bbd4e0fbe2bfee26e711b225fdb9219f0f
6
+ metadata.gz: f8ccb4279ea5eef142f7d78633c98d7cd27b6d16823b4bfe821659766d34a09ed892e80f0e9037fe99b3305bb69a288b8ed83799e5811e6005d7a1d154b8db96
7
+ data.tar.gz: f724d7499c992d3b21f106cac2f875abe746e1fe0e3d4a95753d1895069a13d4b521dd611d89c7b8dfc94e14ff6e3168192eb68385ede4b28ccb4228b475a085
@@ -29,6 +29,10 @@ module SplitIoClient
29
29
  @adapter.clear
30
30
  end
31
31
 
32
+ def empty?
33
+ @adapter.empty?
34
+ end
35
+
32
36
  def batch
33
37
  return [] if @config.events_queue_size.zero?
34
38
 
@@ -25,6 +25,10 @@ module SplitIoClient
25
25
  @config.log_found_exception(__method__.to_s, e)
26
26
  end
27
27
 
28
+ def empty?
29
+ @repository.empty?
30
+ end
31
+
28
32
  protected
29
33
 
30
34
  def metadata
@@ -96,7 +96,16 @@ module SplitIoClient
96
96
 
97
97
  def destroy
98
98
  @config.logger.info('Split client shutdown started...') if @config.debug_enabled
99
-
99
+ if !@config.cache_adapter.is_a?(SplitIoClient::Cache::Adapters::RedisAdapter) && @config.impressions_mode != :none &&
100
+ (!@impressions_repository.empty? || !@events_repository.empty?)
101
+ @config.logger.debug("Impressions and/or Events cache is not empty")
102
+ # Adding small delay to ensure sender threads are fully running
103
+ sleep(0.1)
104
+ if !@config.threads.key?(:impressions_sender) || !@config.threads.key?(:events_sender)
105
+ @config.logger.debug("Periodic data recording thread has not started yet, waiting for service startup.")
106
+ @config.threads[:start_sdk].join(5) if @config.threads.key?(:start_sdk)
107
+ end
108
+ end
100
109
  @config.threads.select { |name, thread| name.to_s.end_with? 'sender' }.values.each do |thread|
101
110
  thread.raise(SplitIoClient::SDKShutdownException)
102
111
  thread.join
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '8.3.2.pre.rc1'
2
+ VERSION = '8.3.2.pre.rc2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splitclient-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.3.2.pre.rc1
4
+ version: 8.3.2.pre.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-18 00:00:00.000000000 Z
11
+ date: 2024-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: allocation_stats