Skip to content

Commit

Permalink
Add delay to Simulation Engine termination (#3184)
Browse files Browse the repository at this point in the history
  • Loading branch information
jafermarq authored Apr 1, 2024
1 parent 930c886 commit 41b491b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/py/flwr/server/superlink/fleet/vce/vce_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ async def run(


# pylint: disable=too-many-arguments,unused-argument,too-many-locals,too-many-branches
# pylint: disable=too-many-statements
def start_vce(
backend_name: str,
backend_config_json_stream: str,
Expand Down Expand Up @@ -341,6 +342,13 @@ def _load() -> ClientApp:
)
)
except LoadClientAppError as loadapp_ex:
f_stop_delay = 10
log(
ERROR,
"LoadClientAppError exception encountered. Terminating simulation in %is",
f_stop_delay,
)
time.sleep(f_stop_delay)
f_stop.set() # set termination event
raise loadapp_ex
except Exception as ex:
Expand Down

0 comments on commit 41b491b

Please sign in to comment.