mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
flake8 fix
This commit is contained in:
parent
5550e0986e
commit
0cb327819d
@ -43,14 +43,14 @@ class RethinkDBConnection(Connection):
|
||||
# NOTE: fix for timeout not initialized on rethinkdb connection
|
||||
# https://github.com/bigchaindb/bigchaindb/issues/1337
|
||||
|
||||
connected=False
|
||||
connected = False
|
||||
dbconf = bigchaindb.config['database']
|
||||
timeout = dbconf['connection_timeout']
|
||||
end_time = time.time()*1000 + timeout
|
||||
while not connected:
|
||||
try:
|
||||
rconn=r.connect(host=self.host, port=self.port, db=self.dbname)
|
||||
connected=True
|
||||
rconn = r.connect(host=self.host, port=self.port, db=self.dbname)
|
||||
connected = True
|
||||
except r.ReqlDriverError as exc:
|
||||
if time.time()*1000 > end_time:
|
||||
raise ConnectionError from exc
|
||||
|
Loading…
x
Reference in New Issue
Block a user