Skip to content

Commit

Permalink
Merge branch 'master' into telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhellander committed Nov 24, 2023
2 parents bb7d3dc + 2b60de1 commit a5f9280
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions fedn/fedn/network/clients/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion fedn/fedn/utils/dispatcher.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

from fedn.common.log_config import logger
from fedn.utils.process import run_process

Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit a5f9280

Please sign in to comment.