lib/ldclient-rb/impl/integrations/redis_impl.rb in launchdarkly-server-sdk-7.1.0 vs lib/ldclient-rb/impl/integrations/redis_impl.rb in launchdarkly-server-sdk-7.2.0

- old
+ new

@@ -40,10 +40,18 @@ def initialize(opts = {}) core = RedisFeatureStoreCore.new(opts) @wrapper = LaunchDarkly::Integrations::Util::CachingStoreWrapper.new(core, opts) end + def monitoring_enabled? + true + end + + def available? + @wrapper.available? + end + # # Default value for the `redis_url` constructor parameter; points to an instance of Redis # running at `localhost` with its default port. # def self.default_redis_url @@ -150,9 +158,17 @@ class RedisFeatureStoreCore < RedisStoreImplBase def initialize(opts) super(opts) @test_hook = opts[:test_hook] # used for unit tests, deliberately undocumented + end + + def available? + # We don't care what the status is, only that we can connect + initialized_internal? + true + rescue + false end def description "RedisFeatureStore" end