fix: coroutine is not iterable when using redis (#2655)

This commit is contained in:
Nicolò Boschi 2024-07-12 18:29:08 +02:00 committed by GitHub
commit ccd6d1c666
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,10 +76,7 @@ async def get_and_cache_all_types_dict(
Raises:
None.
"""
if isinstance(cache_service, AsyncBaseCacheService):
return await cache_service.get(key=key, lock=lock)
else:
return cache_service.get(key=key, lock=lock)
return await cache_service.get(key=key, lock=lock)
async def set_in_cache(key, value):
"""