Skip to content

Commit

Permalink
Try to fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Nov 16, 2024
1 parent 3cae3f1 commit 2d996c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,11 @@ def __read_database_callback(self, db_reader: DatabaseReader):

for label, vertex_size in vertex_sizes.items():
for init_callback in self.__init_callbacks[label]:
logger.info("LiveEventConnection: calling init callback {}",
init_callback)
init_callback(
label, vertex_size, run_time_ms, machine_timestep / 1000.0)
logger.info("LiveEventConnection: database read")

def __init_sender(
self, database: DatabaseReader, vertex_sizes: Dict[str, int]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def __read_db(self, toolchain_address: Tuple[str, int], data: bytes):
# Call the callback
with DatabaseReader(database_path) as db_reader:
for db_callback in self.__database_callbacks:
logger.info("Calling database callback {}", db_callback)
db_callback(db_reader)
else:
logger.warning("Database path was empty - assuming no database")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ def send_start_resume_notification(self) -> None:
"""
logger.info("** Sending start / resume message to external sources "
"to state the simulation has started or resumed. **")
if self.__wait_for_read_confirmation:
self.wait_for_confirmation()
eieio_command_message = NotificationProtocolStartResume()
for c in self.__database_message_connections:
try:
Expand Down Expand Up @@ -181,6 +179,9 @@ def __do_read_notify(self, database_path: Optional[str]) -> None:
if self.__wait_for_read_confirmation:
for c in self.__database_message_connections:
try:
logger.info(
"Waiting for confirmation from {}:{}",
c.remote_ip_address, c.remote_port)
c.receive_eieio_message()
logger.info(
"** Confirmation from {}:{} received, continuing **",
Expand Down

0 comments on commit 2d996c4

Please sign in to comment.