Skip to content

Commit e49c9d7

Browse files
authored
Merge pull request #348 from splitio/development
[7.2.2] Development into master
2 parents 6d9e15e + b75d747 commit e49c9d7

3 files changed

Lines changed: 25 additions & 22 deletions

File tree

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
CHANGES
22

3+
7.2.2 (Dec 18, 2020)
4+
- Fixed issue: undefined local variable or method post_impressions_count
5+
36
7.2.1 (Oct 23, 2020)
47
- Updated redis dependency to >= 4.2.2.
58
- Updated ably error handling.

lib/splitclient-rb/cache/senders/impressions_count_sender.rb

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,32 @@ def impressions_count_thread
4040
@config.logger.info('Posting impressions count due to shutdown')
4141
end
4242
end
43+
end
4344

44-
def post_impressions_count
45-
@impressions_api.post_count(formatter(@impression_counter.pop_all))
46-
rescue StandardError => error
47-
@config.log_found_exception(__method__.to_s, error)
48-
end
49-
50-
def formatter(counts)
51-
return if counts.empty?
45+
def post_impressions_count
46+
@impressions_api.post_count(formatter(@impression_counter.pop_all))
47+
rescue StandardError => error
48+
@config.log_found_exception(__method__.to_s, error)
49+
end
5250

53-
formated_counts = {pf: []}
51+
def formatter(counts)
52+
return if counts.empty?
5453

55-
counts.each do |key, value|
56-
key_splited = key.split('::')
57-
58-
formated_counts[:pf] << {
59-
f: key_splited[0].to_s, # feature name
60-
m: key_splited[1].to_i, # time frame
61-
rc: value # count
62-
}
63-
end
54+
formated_counts = {pf: []}
6455

65-
formated_counts
66-
rescue StandardError => error
67-
@config.log_found_exception(__method__.to_s, error)
56+
counts.each do |key, value|
57+
key_splited = key.split('::')
58+
59+
formated_counts[:pf] << {
60+
f: key_splited[0].to_s, # feature name
61+
m: key_splited[1].to_i, # time frame
62+
rc: value # count
63+
}
6864
end
65+
66+
formated_counts
67+
rescue StandardError => error
68+
@config.log_found_exception(__method__.to_s, error)
6969
end
7070
end
7171
end

lib/splitclient-rb/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module SplitIoClient
2-
VERSION = '7.2.1'
2+
VERSION = '7.2.2'
33
end

0 commit comments

Comments
 (0)