Skip to content

Commit 93e6bdd

Browse files
committed
fixes for rubocop
1 parent 9e3dddb commit 93e6bdd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/splitclient-rb/sse/workers/splits_worker.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ def return_split_from_json(notification)
4949
)
5050
end
5151

52+
def check_update(notification)
53+
@feature_flags_repository.get_change_number == notification.data['pcn'] && !notification.data['d'].nil?
54+
end
55+
5256
def update_feature_flag(notification)
5357
return if @feature_flags_repository.get_change_number.to_i > notification.data['changeNumber']
5458

55-
if @feature_flags_repository.get_change_number == notification.data['pcn'] && !notification.data['d'].nil?
59+
if check_update(notification)
5660
begin
5761
new_split = return_split_from_json(notification)
5862
if SplitIoClient::Engine::Models::Split.archived?(new_split)

0 commit comments

Comments
 (0)