mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-16 23:03:49 +00:00
add back Any
This commit is contained in:
parent
1bcf484d83
commit
a3064ca6fc
5 changed files with 15 additions and 11 deletions
|
@ -47,6 +47,10 @@ class DiskRegistry(Registry):
|
|||
# TODO: make it thread safe using CAS
|
||||
async def register(self, obj: RoutableObjectWithProvider) -> None:
|
||||
existing_objects = await self.get(obj.identifier)
|
||||
# dont register if the object's providerid already exists
|
||||
for eobj in existing_objects:
|
||||
if eobj.provider_id == obj.provider_id:
|
||||
return
|
||||
|
||||
existing_objects.append(obj)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue