init registry once

This commit is contained in:
Dinesh Yeduguru 2024-11-13 15:17:33 -08:00
parent e90ea1ab1e
commit b8fdeb7873
2 changed files with 3 additions and 4 deletions

View file

@ -64,8 +64,6 @@ class CommonRoutingTableImpl(RoutingTable):
self.dist_registry = dist_registry
async def initialize(self) -> None:
# Initialize the registry if not already done
await self.dist_registry.initialize()
async def add_objects(
objs: List[RoutableObjectWithProvider], provider_id: str, cls

View file

@ -220,5 +220,6 @@ async def create_dist_registry(
db_path=(DISTRIBS_BASE_DIR / image_name / "kvstore.db").as_posix()
)
)
return CachedDiskDistributionRegistry(dist_kvstore), dist_kvstore
dist_registry = CachedDiskDistributionRegistry(dist_kvstore)
await dist_registry.initialize()
return dist_registry, dist_kvstore