diff --git a/fedn/fedn/network/clients/client.py b/fedn/fedn/network/clients/client.py index e1f2344e4..6773d3795 100644 --- a/fedn/fedn/network/clients/client.py +++ b/fedn/fedn/network/clients/client.py @@ -809,11 +809,11 @@ def run(self): old_state = self.state while True: time.sleep(1) - cnt += 1 + if cnt == 0: + logger.info("Client is active, waiting for model update requests.") + cnt = 1 if self.state != old_state: logger.info("Client in {} state.".format(ClientStateToString(self.state))) - if cnt > 5: - cnt = 0 if not self._attached: logger.info("Detached from combiner.") # TODO: Implement a check/condition to ulitmately close down if too many reattachment attepts have failed. s diff --git a/fedn/fedn/utils/dispatcher.py b/fedn/fedn/utils/dispatcher.py index 8b80a5e16..c7ace0ab5 100644 --- a/fedn/fedn/utils/dispatcher.py +++ b/fedn/fedn/utils/dispatcher.py @@ -1,3 +1,5 @@ +import os + from fedn.common.log_config import logger from fedn.utils.process import run_process @@ -32,7 +34,10 @@ def run_cmd(self, cmd_type): args = cmdsandargs[1:] # shell (this could be a venv, TODO: parametrize) - shell = ['/bin/sh', '-c'] + if os.name == "nt": + shell = [] + else: + shell = ['/bin/sh', '-c'] # add the corresponding process defined in project.yaml and append arguments from invoked command args = shell + [' '.join(cmd + args)]