From 083ff739d4dd888d2a879df2ab91ae2ebcc59064 Mon Sep 17 00:00:00 2001 From: "van Andel, Gerhard" Date: Mon, 12 Apr 2021 14:20:38 -0600 Subject: [PATCH] update for enterprise-cosmos --- cosmos/lib/cosmos/utilities/authorization.rb | 4 ++-- cosmos/lib/cosmos/utilities/store.rb | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cosmos/lib/cosmos/utilities/authorization.rb b/cosmos/lib/cosmos/utilities/authorization.rb index bf9264e88..e8337455b 100644 --- a/cosmos/lib/cosmos/utilities/authorization.rb +++ b/cosmos/lib/cosmos/utilities/authorization.rb @@ -18,9 +18,9 @@ # copyright holder begin - require 'cosmos-enterprise/utilities/authorization' + require 'enterprise-cosmos/utilities/authorization' rescue LoadError - # If we're not in cosmos-enterprise we define our own + # If we're not in enterprise-cosmos we define our own module Cosmos class AuthError < StandardError end diff --git a/cosmos/lib/cosmos/utilities/store.rb b/cosmos/lib/cosmos/utilities/store.rb index 7dd1bda0c..30c74d122 100644 --- a/cosmos/lib/cosmos/utilities/store.rb +++ b/cosmos/lib/cosmos/utilities/store.rb @@ -23,10 +23,10 @@ require 'connection_pool' begin - require 'cosmos-enterprise/utilities/store' - $cosmos_enterprise = true + require 'enterprise-cosmos/utilities/store' + $enterprise_cosmos = true rescue LoadError - $cosmos_enterprise = false + $enterprise_cosmos = false end module Cosmos @@ -77,13 +77,13 @@ def initialize(pool_size = 10) @topic_offsets = {} end - unless $cosmos_enterprise + unless $enterprise_cosmos def build_redis return Redis.new(url: @redis_url) end end - unless $cosmos_enterprise + unless $enterprise_cosmos def get_tlm_values(items, scope: $cosmos_scope) values = [] return values if items.empty? @@ -275,7 +275,7 @@ def update_topic_offsets(topics) def self.read_topics(topics, offsets = nil, timeout_ms = 1000, &block) self.instance.read_topics(topics, offsets, timeout_ms, &block) end - unless $cosmos_enterprise + unless $enterprise_cosmos def read_topics(topics, offsets = nil, timeout_ms = 1000, &block) # Logger.debug "read_topics: #{topics}, #{offsets} pool:#{@redis_pool}" @redis_pool.with do |redis|