Make database client try to use most recent connection instead of generating new one
This commit is contained in:
@@ -193,6 +193,9 @@ class DatabaseClient(Application):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
if connection_id is None:
|
if connection_id is None:
|
||||||
|
if self.connections:
|
||||||
|
connection_id = list(self.connections.keys())[-1]
|
||||||
|
else:
|
||||||
connection_id = str(uuid4())
|
connection_id = str(uuid4())
|
||||||
|
|
||||||
if not self.connections.get(connection_id):
|
if not self.connections.get(connection_id):
|
||||||
|
|||||||
Reference in New Issue
Block a user