Skip to content

Commit 69ed555

Browse files
committed
Remove unused loop params
1 parent 4aa3eb8 commit 69ed555

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/aleph/vm/orchestrator/cli.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ async def fake_read() -> bytes:
188188

189189
bench: list[float] = []
190190

191-
loop = asyncio.get_event_loop()
192-
pool = VmPool(loop)
191+
pool = VmPool()
193192
pool.setup()
194193

195194
# Does not make sense in benchmarks
@@ -246,8 +245,7 @@ async def start_instance(item_hash: ItemHash, pubsub: Optional[PubSub], pool) ->
246245
async def run_instances(instances: list[ItemHash]) -> None:
247246
"""Run instances from a list of message identifiers."""
248247
logger.info(f"Instances to run: {instances}")
249-
loop = asyncio.get_event_loop()
250-
pool = VmPool(loop)
248+
pool = VmPool()
251249
# The main program uses a singleton pubsub instance in order to watch for updates.
252250
# We create another instance here since that singleton is not initialized yet.
253251
# Watching for updates on this instance will therefore not work.

src/aleph/vm/orchestrator/supervisor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def run():
145145
engine = setup_engine()
146146
asyncio.run(create_tables(engine))
147147

148-
pool = VmPool(loop)
148+
pool = VmPool()
149149
pool.setup()
150150

151151
hostname = settings.DOMAIN_NAME

src/aleph/vm/pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class VmPool:
4545
systemd_manager: SystemDManager
4646
creation_lock: asyncio.Lock
4747

48-
def __init__(self, loop: asyncio.AbstractEventLoop):
48+
def __init__(self):
4949
self.counter = settings.START_ID_INDEX
5050
self.executions = {}
5151
self.message_cache = {}

0 commit comments

Comments
 (0)