Skip to content

Commit

Permalink
wip: more log messages in context manager
Browse files Browse the repository at this point in the history
  • Loading branch information
pgierz committed Jan 9, 2025
1 parent 4d40d82 commit 097c250
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pymorize/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ class DaskContext:
@classmethod
@contextmanager
def set_cluster(cls, cluster):
logger.info(f"Setting Dask cluster {cluster=} in context!")
cls._current_cluster = cluster
try:
yield
finally:
logger.info("Removing Dask cluster from context!")
cls._current_cluster = None

@classmethod
Expand Down

0 comments on commit 097c250

Please sign in to comment.