add back Any

This commit is contained in:
Dinesh Yeduguru 2024-11-01 14:32:50 -07:00 committed by Dinesh Yeduguru
parent 1bcf484d83
commit a3064ca6fc
5 changed files with 15 additions and 11 deletions

View file

@ -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)