Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ITISFoundation/osparc-filecomms
Browse files Browse the repository at this point in the history
  • Loading branch information
wvangeit committed Apr 16, 2024
2 parents 2126929 + 092bd26 commit e6fdae6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/handshakers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import json
import time
import logging
import pathlib as pl
import time

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
Expand Down Expand Up @@ -69,7 +69,8 @@ def shake_initiator(self):
def try_handshake():
handshake_input_content = self.read_until_path_exists(
self.handshake_input_path,
wait_message="Waiting for handshake confirmation ...",
wait_message="Waiting for handshake confirmation at "
f"{self.handshake_input_path}...",
)

return json.loads(handshake_input_content)
Expand All @@ -85,7 +86,8 @@ def try_handshake():
else:
if waiter % self.print_polling_interval == 0:
logger.info(
"Waiting for correct handshake registration confirmation ..."
"Waiting for correct handshake registration "
"confirmation ..."
)
waiter += 1
time.sleep(self.polling_interval)
Expand Down Expand Up @@ -117,7 +119,8 @@ def shake_receiver(self):
handshake_in = json.loads(
self.read_until_path_exists(
self.handshake_input_path,
wait_message="Waiting for handshake file ...",
wait_message="Waiting for handshake file at "
f"{self.handshake_input_path} ...",
)
)

Expand Down Expand Up @@ -150,7 +153,7 @@ def shake_receiver(self):
raise ValueError(f"Invalid handshake command: {command}")

if waiter % self.print_polling_interval == 0:
logger.info("Waiting for registration confirmation...")
logger.info("Waiting for registration confirmation ...")
time.sleep(self.polling_interval)
waiter += 1

Expand Down

0 comments on commit e6fdae6

Please sign in to comment.