Merge remote-tracking branch 'origin/dev' into feature/2257-router-routes-cannot-be-represented-in-config-file
This commit is contained in:
@@ -548,6 +548,11 @@ class Link(SimComponent):
|
||||
def __str__(self) -> str:
|
||||
return f"{self.endpoint_a}<-->{self.endpoint_b}"
|
||||
|
||||
def apply_timestep(self, timestep: int) -> None:
|
||||
"""Apply a timestep to the simulation."""
|
||||
super().apply_timestep(timestep)
|
||||
self.current_load = 0.0
|
||||
|
||||
|
||||
class Node(SimComponent):
|
||||
"""
|
||||
|
||||
@@ -196,7 +196,11 @@ class DatabaseClient(Application):
|
||||
return False
|
||||
|
||||
if connection_id is None:
|
||||
connection_id = str(uuid4())
|
||||
if self.connections:
|
||||
connection_id = list(self.connections.keys())[-1]
|
||||
# TODO: if the most recent connection dies, it should be automatically cleared.
|
||||
else:
|
||||
connection_id = str(uuid4())
|
||||
|
||||
if not self.connections.get(connection_id):
|
||||
if not self.connect(connection_id=connection_id):
|
||||
|
||||
Reference in New Issue
Block a user