Class: OpenC3::EphemeralStore
- Defined in:
- lib/openc3/utilities/store_autoload.rb
Constant Summary
Constants inherited from Store
Instance Attribute Summary
Attributes inherited from Store
Instance Method Summary collapse
-
#initialize(pool_size = 10, db_shard: 0) ⇒ EphemeralStore
constructor
A new instance of EphemeralStore.
Methods inherited from Store
#build_redis, db_shard_for_target, #get_last_offset, #get_newest_message, #get_oldest_message, instance, method_missing, #method_missing, #read_topics, #trim_topic, #update_topic_offsets, #write_topic
Constructor Details
#initialize(pool_size = 10, db_shard: 0) ⇒ EphemeralStore
Returns a new instance of EphemeralStore.
261 262 263 264 265 266 |
# File 'lib/openc3/utilities/store_autoload.rb', line 261 def initialize(pool_size = 10, db_shard: 0) super(pool_size) hostname = ENV['OPENC3_REDIS_EPHEMERAL_HOSTNAME'].to_s.gsub("SHARDNUM", db_shard.to_s) @redis_url = "redis://#{hostname}:#{ENV.fetch('OPENC3_REDIS_EPHEMERAL_PORT', 6380)}" @redis_pool = StoreConnectionPool.new(size: pool_size) { build_redis() } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class OpenC3::Store