Skip to content

Commit

Permalink
shutdown dask cluster gracefully (#173)
Browse files Browse the repository at this point in the history
Co-authored-by: Emma Ai <[email protected]>
  • Loading branch information
emmaai and Emma Ai authored Nov 26, 2024
1 parent 50fdef1 commit caa72ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions odc/stats/proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ def run(
)
raise ValueError("Must supply one of tasks= or sqs=")

def __del__(self):
if self.client():
self.client().close()


def get_max_mem() -> int:
"""
Expand Down

0 comments on commit caa72ff

Please sign in to comment.