Skip to content

Commit 4512aad

Browse files
olethanhnesitor
authored andcommitted
Only load domain at start if there are executions
This prevent slow startup that may occur from the https://api.dns.public.aleph.sh/instances/list
1 parent eff0f3d commit 4512aad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/aleph/vm/pool.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ async def load_persistent_executions(self):
332332
else:
333333
execution.uuid = saved_execution.uuid
334334
await execution.record_usage()
335-
await self.update_domain_mapping(force_update=True)
335+
if self.executions:
336+
await self.update_domain_mapping(force_update=True)
336337
logger.info(f"Loaded {len(self.executions)} executions")
337338

338339
async def stop(self):

0 commit comments

Comments
 (0)