Skip to content

Commit

Permalink
Update plugin.py: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
pfackeldey authored Nov 1, 2024
1 parent 76d599a commit b9faa17
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions coffea_casa/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class PeriodicGC(WorkerPlugin):
----------
freq : datetime.timedelta
The frequency of garbage collection. Default is 1ms.
tresh : int
thresh : int
The threshold memory in bytes. If the process memory exceeds this value, garbage collection is triggered. Default is 100MB.
Expand All @@ -157,15 +157,15 @@ class PeriodicGC(WorkerPlugin):
def __init__(
self,
freq: datetime.timedelta = datetime.timedelta(milliseconds=1),
tresh: int = parse_bytes("100 MB"),
thresh: int = parse_bytes("100 MB"),
) -> None:
"""
Parameters:
freq: Frequency of garbage collection in seconds. Default is 1ms.
tresh: Threshold memory in bytes. If the process memory exceeds this value, garbage collection is triggered. Default is 100MB.
thresh: Threshold memory in bytes. If the process memory exceeds this value, garbage collection is triggered. Default is 100MB.
"""
self.freq = freq
self.tresh = tresh
self.thresh = thresh

def setup(self, worker) -> None:
"""
Expand All @@ -185,5 +185,5 @@ async def _gc_collect(self) -> None:
"""
Trigger garbage collection if the process memory exceeds the threshold.
"""
if self.worker.monitor.get_process_memory() >= self.tresh:
if self.worker.monitor.get_process_memory() >= self.thresh:
gc.collect()

0 comments on commit b9faa17

Please sign in to comment.