mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-25 04:32:11 +00:00
Have apiclient use first rather than last
apiclient was preferring the slowest rather than the fastest respondant, inconsistent with intent and everything else.
This commit is contained in:
parent
5bc9cb57d1
commit
e7b93dba50
@ -8,11 +8,12 @@ class HTTPSClient(client.HTTPConnection, object):
|
||||
def __init__(self, port=443):
|
||||
self.stdheaders = {}
|
||||
info = open('/etc/confluent/confluent.info').read().split('\n')
|
||||
host = None
|
||||
for line in info:
|
||||
if line.startswith('NODENAME:'):
|
||||
node = line.split(' ')[1]
|
||||
self.stdheaders['CONFLUENT_NODENAME'] = node
|
||||
if line.startswith('MANAGER:'):
|
||||
if line.startswith('MANAGER:') and not host:
|
||||
host = line.split(' ')[1]
|
||||
self.stdheaders['CONFLUENT_APIKEY'] = open('/etc/confluent/confluent.apikey').read().strip()
|
||||
client.HTTPConnection.__init__(self, host, port)
|
||||
|
@ -8,11 +8,12 @@ class HTTPSClient(client.HTTPConnection, object):
|
||||
def __init__(self, port=443):
|
||||
self.stdheaders = {}
|
||||
info = open('/etc/confluent/confluent.info').read().split('\n')
|
||||
host = None
|
||||
for line in info:
|
||||
if line.startswith('NODENAME:'):
|
||||
node = line.split(' ')[1]
|
||||
self.stdheaders['CONFLUENT_NODENAME'] = node
|
||||
if line.startswith('MANAGER:'):
|
||||
if line.startswith('MANAGER:') and not host:
|
||||
host = line.split(' ')[1]
|
||||
self.stdheaders['CONFLUENT_APIKEY'] = open('/etc/confluent/confluent.apikey').read().strip()
|
||||
client.HTTPConnection.__init__(self, host, port)
|
||||
|
Loading…
Reference in New Issue
Block a user