Skip to content

Commit

Permalink
Add comments to start_client (#2558)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljanes authored Nov 6, 2023
1 parent 0b6b617 commit 1915eba
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/py/flwr/client/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def _check_actionable_client(
)


# pylint: disable=import-outside-toplevel,too-many-locals,too-many-branches
# pylint: disable=import-outside-toplevel
# pylint: disable=too-many-branches
# pylint: disable=too-many-locals
# pylint: disable=too-many-statements
def start_client(
*,
Expand Down Expand Up @@ -152,11 +154,16 @@ def single_client_factory(
create_node() # pylint: disable=not-callable

while True:
# Receive
task_ins = receive()
if task_ins is None:
time.sleep(3) # Wait for 3s before asking again
continue

# Handle task message
task_res, sleep_duration, keep_going = handle(client_fn, task_ins)

# Send
send(task_res)
if not keep_going:
break
Expand Down

0 comments on commit 1915eba

Please sign in to comment.