mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-01 16:24:44 +00:00
init registry once
This commit is contained in:
parent
e90ea1ab1e
commit
b8fdeb7873
2 changed files with 3 additions and 4 deletions
|
@ -64,8 +64,6 @@ class CommonRoutingTableImpl(RoutingTable):
|
||||||
self.dist_registry = dist_registry
|
self.dist_registry = dist_registry
|
||||||
|
|
||||||
async def initialize(self) -> None:
|
async def initialize(self) -> None:
|
||||||
# Initialize the registry if not already done
|
|
||||||
await self.dist_registry.initialize()
|
|
||||||
|
|
||||||
async def add_objects(
|
async def add_objects(
|
||||||
objs: List[RoutableObjectWithProvider], provider_id: str, cls
|
objs: List[RoutableObjectWithProvider], provider_id: str, cls
|
||||||
|
|
|
@ -220,5 +220,6 @@ async def create_dist_registry(
|
||||||
db_path=(DISTRIBS_BASE_DIR / image_name / "kvstore.db").as_posix()
|
db_path=(DISTRIBS_BASE_DIR / image_name / "kvstore.db").as_posix()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
dist_registry = CachedDiskDistributionRegistry(dist_kvstore)
|
||||||
return CachedDiskDistributionRegistry(dist_kvstore), dist_kvstore
|
await dist_registry.initialize()
|
||||||
|
return dist_registry, dist_kvstore
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue