Skip to content

Commit 3a2f5ae

Browse files
committed
Add docstrings and remove unused code
1 parent 89edebc commit 3a2f5ae

2 files changed

Lines changed: 107 additions & 88 deletions

File tree

alchemiscale/compute/monitor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import time
1212
from threading import Lock
1313

14+
from alchemiscale.compute.settings import AsynchronousComputeServiceSettings
15+
1416

1517
# Signal to be issued by a resource manager to a compute
1618
# service. These signals are suggestions and are meant to inform the
@@ -19,7 +21,7 @@
1921
# 1. TERMINATE: tool/resource failure, shut stop all calculations
2022
# 2. SHRINK: resource is oversubscribed, scale down
2123
# 3. MAINTAIN: keep at current subscription
22-
# 4. GROW: resource is undersubscribed
24+
# 4. GROW: resource is under-subscribed
2325
class ResourceSignal(IntEnum):
2426
# order matters, higher priority signals should appear at top
2527
TERMINATE = auto()
@@ -47,7 +49,7 @@ class Monitor:
4749
4850
"""
4951

50-
def __init__(self, settings: ComputeServiceSettings):
52+
def __init__(self, settings: AsynchronousComputeServiceSettings):
5153
self._setup(settings)
5254
self._lock = Lock()
5355
self._terminate = False

0 commit comments

Comments
 (0)