lib/ldclient-rb/stream.rb in launchdarkly-server-sdk-6.3.4 vs lib/ldclient-rb/stream.rb in launchdarkly-server-sdk-6.4.0
- old
+ new
@@ -84,21 +84,21 @@
log_connection_result(true)
method = message.type
@config.logger.debug { "[LDClient] Stream received #{method} message: #{message.data}" }
if method == PUT
message = JSON.parse(message.data, symbolize_names: true)
- all_data = Impl::Model.make_all_store_data(message[:data])
+ all_data = Impl::Model.make_all_store_data(message[:data], @config.logger)
@feature_store.init(all_data)
@initialized.make_true
@config.logger.info { "[LDClient] Stream initialized" }
@ready.set
elsif method == PATCH
data = JSON.parse(message.data, symbolize_names: true)
for kind in [FEATURES, SEGMENTS]
key = key_for_path(kind, data[:path])
if key
data = data[:data]
- Impl::Model.postprocess_item_after_deserializing!(kind, data)
+ Impl::DataModelPreprocessing::Preprocessor.new(@config.logger).preprocess_item!(kind, data)
@feature_store.upsert(kind, data)
break
end
end
elsif method == DELETE