Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use CASSANDRA_URIs variable for all Cass URIs

  • Loading branch information...
commit 0716593d744971338db40151447e5f8e247e0a62 1 parent 01871b3
@noahgibbs noahgibbs authored
Showing with 2 additions and 10 deletions.
  1. +2 −10 config.ru
View
12 config.ru
@@ -1,19 +1,11 @@
require "hastur-server/service/retrieval"
require "hastur-rack"
-HASTUR_CASSANDRA_LIST="/opt/hastur/conf/cassandra-servers.txt"
-
# defined on most of our Hastur boxes via hastur-deploy
cassandra_servers = []
-if File.exists? HASTUR_CASSANDRA_LIST
- File.foreach(HASTUR_CASSANDRA_LIST) do |line|
- line.chomp!
- line.gsub(/\s+#.*$/, '')
- cassandra_servers << line unless line.empty?
- end
-elsif ENV['HASTUR_CASSANDRA_LIST']
- cassandra_servers = ENV['HASTUR_CASSANDRA_LIST'].split(':').map(&:strip)
+if ENV['CASSANDRA_URIS']
+ cassandra_servers = MultiJson.load(ENV['CASSANDRA_URIS']).flatten
else
cassandra_servers = [ '127.0.0.1:9160' ]
end
Please sign in to comment.
Something went wrong with that request. Please try again.