Skip to content

Commit

Permalink
change 30s to 1e9 to prevent death
Browse files Browse the repository at this point in the history
  • Loading branch information
panh99 committed Mar 27, 2024
1 parent d8f208b commit 23a1cce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/py/flwr/server/superlink/state/in_memory_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ def create_node(self) -> int:
with self.lock:
if node_id not in self.node_ids:
# Default ping interval is 30s
self.node_ids[node_id] = time.time() + 30
# TODO: change 1e9 to 30s # pylint: disable=W0511
self.node_ids[node_id] = time.time() + 1e9
return node_id
log(ERROR, "Unexpected node registration failure.")
return 0
Expand Down
3 changes: 2 additions & 1 deletion src/py/flwr/server/superlink/state/sqlite_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@ def create_node(self) -> int:

try:
# Default ping interval is 30s
self.query(query, (node_id, 30.0))
# TODO: change 1e9 to 30s # pylint: disable=W0511
self.query(query, (node_id, 1e9))
except sqlite3.IntegrityError:
log(ERROR, "Unexpected node registration failure.")
return 0
Expand Down

0 comments on commit 23a1cce

Please sign in to comment.