Skip to content

Commit 4a2952b

Browse files
committed
fix missing updates
1 parent e56145b commit 4a2952b

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

lib/ldclient-rb/events.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def main_loop(inbox, outbox, flush_workers, diagnostic_event_workers)
283283
dispatch_event(message, outbox)
284284
end
285285
rescue => e
286-
Util.log_exception(@config.logger, "Unexpected error in event processor", e)
286+
Impl::Util.log_exception(@config.logger, "Unexpected error in event processor", e)
287287
end
288288
end
289289
end
@@ -410,7 +410,7 @@ def send_diagnostic_event(event, diagnostic_event_workers)
410410
begin
411411
@event_sender.send_event_data(event.to_json, "diagnostic event", true)
412412
rescue => e
413-
Util.log_exception(@config.logger, "Unexpected error in event processor", e)
413+
Impl::Util.log_exception(@config.logger, "Unexpected error in event processor", e)
414414
end
415415
end
416416
end

lib/ldclient-rb/impl/data_source/polling.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require "ldclient-rb/impl/repeating_task"
2+
require "ldclient-rb/impl/util"
23

34
require "concurrent/atomics"
45
require "json"
@@ -69,7 +70,7 @@ def poll
6970
stop_with_error_info error_info
7071
end
7172
rescue StandardError => e
72-
Util.log_exception(@config.logger, "Exception while polling", e)
73+
Impl::Util.log_exception(@config.logger, "Exception while polling", e)
7374
@config.data_source_update_sink&.update_status(
7475
LaunchDarkly::Interfaces::DataSource::Status::INTERRUPTED,
7576
LaunchDarkly::Interfaces::DataSource::ErrorInfo.new(LaunchDarkly::Interfaces::DataSource::ErrorInfo::UNKNOWN, 0, e.to_s, Time.now)

lib/ldclient-rb/ldclient.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
require "ldclient-rb/impl/flag_tracker"
1414
require "ldclient-rb/impl/migrations/tracker"
1515
require "ldclient-rb/impl/store_client_wrapper"
16+
require "ldclient-rb/impl/util"
1617
require "ldclient-rb/events"
1718
require "ldclient-rb/in_memory_store"
1819
require "concurrent"
@@ -617,7 +618,7 @@ def all_flags_state(context, options={})
617618
begin
618619
features = @store.all(FEATURES)
619620
rescue => exn
620-
Util.log_exception(@config.logger, "Unable to read flags for all_flags_state", exn)
621+
Impl::Util.log_exception(@config.logger, "Unable to read flags for all_flags_state", exn)
621622
return FeatureFlagsState.new(false)
622623
end
623624

@@ -634,7 +635,7 @@ def all_flags_state(context, options={})
634635
detail = eval_result.detail
635636
rescue => exn
636637
detail = EvaluationDetail.new(nil, nil, EvaluationReason::error(EvaluationReason::ERROR_EXCEPTION))
637-
Util.log_exception(@config.logger, "Error evaluating flag \"#{k}\" in all_flags_state", exn)
638+
Impl::Util.log_exception(@config.logger, "Error evaluating flag \"#{k}\" in all_flags_state", exn)
638639
end
639640

640641
requires_experiment_data = experiment?(f, detail.reason)
@@ -804,7 +805,7 @@ def evaluate_internal(key, context, default, with_reasons)
804805
record_flag_eval(feature, context, detail, default, with_reasons)
805806
[detail, feature, nil]
806807
rescue => exn
807-
Util.log_exception(@config.logger, "Error evaluating feature flag \"#{key}\"", exn)
808+
Impl::Util.log_exception(@config.logger, "Error evaluating feature flag \"#{key}\"", exn)
808809
detail = Evaluator.error_result(EvaluationReason::ERROR_EXCEPTION, default)
809810
record_flag_eval_error(feature, context, default, detail.reason, with_reasons)
810811
[detail, feature, exn.to_s]

spec/impl/util_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require "ldclient-rb/impl/util"
12
require "spec_helper"
23

34
module LaunchDarkly

0 commit comments

Comments
 (0)