revrt.utilities.monitoring.close_dask_client#

close_dask_client(client, timeout=600)[source]#

Close a Dask client without failing on shutdown timeouts

Parameters:
  • client (distributed.Client or None) – Dask client to close. If None, this function does nothing.

  • timeout (int, optional) – Number of seconds to wait for the client to close before timing out. If the client fails to close within this time, a warning is logged and the client is marked as closed anyway to allow cleanup to proceed without hanging. By default, 600.