Skip to content

Commit

Permalink
Pull request #86: update for enterprise-cosmos
Browse files Browse the repository at this point in the history
Merge in COSMOSEE/base from enterprise-cosmos-update to master

* commit '083ff739d4dd888d2a879df2ab91ae2ebcc59064':
  update for enterprise-cosmos
  • Loading branch information
ryanmelt committed Apr 12, 2021
2 parents a5303ba + 083ff73 commit 53e2ba2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cosmos/lib/cosmos/utilities/authorization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions cosmos/lib/cosmos/utilities/store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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?
Expand Down Expand Up @@ -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|
Expand Down

0 comments on commit 53e2ba2

Please sign in to comment.