splitclient-rb 7.1.4.pre.rc18-java → 7.1.4.pre.rc19-java

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
  SHA1:
3
- metadata.gz: ca9b57f69422589f373aaed9cbe0ca1352b70ed5
4
- data.tar.gz: 4ccc742bbf83c966ab21498f5eb0fb4afc104a48
3
+ metadata.gz: 90fcccf598ffb68bcd8a24572926db732d7a8597
4
+ data.tar.gz: 441fcced7138c622713e42b5405743fdd8d95a9e
5
5
  SHA512:
6
- metadata.gz: e932901095fea7a9d11fd846dd7e942cf97169cd3b1535f0678e81e5864b8e8545e3deefb1f07a6c16087b8916d4254f26020f0dd3868f0df4d7cb9b227b9e85
7
- data.tar.gz: fc4e1ce6e5503eb4fb145f60ad0bb7af7b659343733e93510809cbfd6c4c2ec292e45090cf11b8c5ede9770bc0eec23b2e670facef936f49e08371e962cbfa87
6
+ metadata.gz: 2b73e0212db9cc59f0c77369c931418ca067e0f1c9bec0b711213adbe5aa82ad67a9a3c6e1cbec8ac4b2f8598df909d178a5f9ad9c061cc3f405fb9ab34e2fdc
7
+ data.tar.gz: c56739c82ecea3c4626cc40e7495f16660099ed7be72956f423afc0b6819f827cd8e636bb1f7974d1d2948f9f54f03343d9e9956eae6625e4df14eefeb5aa7f8
@@ -18,8 +18,10 @@ module SplitIoClient
18
18
  end
19
19
  end
20
20
 
21
- def add(impression)
22
- enqueue(impression)
21
+ def add_bulk(impressions)
22
+ impressions.each do |impression|
23
+ enqueue(impression)
24
+ end
23
25
  end
24
26
 
25
27
  private
@@ -17,12 +17,9 @@ module SplitIoClient
17
17
 
18
18
  impression_data[:pt] = @impression_observer.test_and_set(impression_data) unless redis?
19
19
 
20
- impression_debug = impression(impression_data, params[:attributes])
21
- impression_router.add(impression_debug)
20
+ @impression_counter.inc(split_name, impression_data[:m]) if optimized? && !redis?
22
21
 
23
- return impression_optimized(split_name, impression_data, params[:attributes]) if optimized? && !redis?
24
-
25
- impression_debug
22
+ impression(impression_data, params[:attributes])
26
23
  rescue StandardError => error
27
24
  @config.log_found_exception(__method__.to_s, error)
28
25
  end
@@ -30,7 +27,14 @@ module SplitIoClient
30
27
  def track(impressions)
31
28
  return if impressions.empty?
32
29
 
33
- @impressions_repository.add_bulk(impressions)
30
+ impression_router.add_bulk(impressions)
31
+
32
+ if optimized? && !redis?
33
+ optimized_impressions = impressions.select { |imp| should_queue_impression?(imp[:i]) }
34
+ @impressions_repository.add_bulk(optimized_impressions)
35
+ else
36
+ @impressions_repository.add_bulk(impressions)
37
+ end
34
38
  rescue StandardError => error
35
39
  @config.log_found_exception(__method__.to_s, error)
36
40
  end
@@ -67,12 +71,6 @@ module SplitIoClient
67
71
  @config.impressions_mode == :optimized
68
72
  end
69
73
 
70
- def impression_optimized(split_name, impression_data, attributes)
71
- @impression_counter.inc(split_name, impression_data[:m])
72
-
73
- impression(impression_data, attributes) if should_queue_impression?(impression_data)
74
- end
75
-
76
74
  def should_queue_impression?(impression)
77
75
  impression[:pt].nil? ||
78
76
  (ImpressionCounter.truncate_time_frame(impression[:pt]) != ImpressionCounter.truncate_time_frame(impression[:m]))
@@ -88,6 +86,8 @@ module SplitIoClient
88
86
 
89
87
  def impression_router
90
88
  @impression_router ||= SplitIoClient::ImpressionRouter.new(@config)
89
+ rescue StandardError => error
90
+ @config.log_found_exception(__method__.to_s, error)
91
91
  end
92
92
  end
93
93
  end
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '7.1.4.pre.rc18'
2
+ VERSION = '7.1.4.pre.rc19'
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: 7.1.4.pre.rc18
4
+ version: 7.1.4.pre.rc19
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-22 00:00:00.000000000 Z
11
+ date: 2020-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement