Skip to content

Commit caa72ff

Browse files
emmaaiEmma Ai
and
Emma Ai
authored
shutdown dask cluster gracefully (#173)
Co-authored-by: Emma Ai <emma.ai@ga.gov.au>
1 parent 50fdef1 commit caa72ff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

odc/stats/proc.py

+4
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ def run(
327327
)
328328
raise ValueError("Must supply one of tasks= or sqs=")
329329

330+
def __del__(self):
331+
if self.client():
332+
self.client().close()
333+
330334

331335
def get_max_mem() -> int:
332336
"""

0 commit comments

Comments
 (0)