search-with-images6
All checks were successful
Deploy on push / deploy (push) Successful in 1m8s

This commit is contained in:
Untone 2024-06-02 16:14:01 +03:00
parent eba991f4f5
commit fb2c31a81b
2 changed files with 3 additions and 5 deletions

View File

@ -305,8 +305,6 @@ async def load_shouts_search(_, _info, text, limit=50, offset=0):
shout_id = int(shout_id) shout_id = int(shout_id)
scores[shout_id] = sr.get("score") scores[shout_id] = sr.get("score")
hits_ids.append(shout_id) hits_ids.append(shout_id)
else:
assert "no id!!"
shouts = [] shouts = []
with local_session() as session: with local_session() as session:
shouts = session.execute(query_shouts()) shouts = session.execute(query_shouts())

View File

@ -25,14 +25,14 @@ class RedisCache:
async def execute(self, command, *args, **kwargs): async def execute(self, command, *args, **kwargs):
if self._client: if self._client:
try: try:
logger.debug(f"{command} {args} {kwargs}") logger.debug(f"{command} {args[0]}") # {args} {kwargs}")
for arg in args: for arg in args:
if isinstance(arg, dict): if isinstance(arg, dict):
if arg.get("_sa_instance_state"): if arg.get("_sa_instance_state"):
del arg["_sa_instance_state"] del arg["_sa_instance_state"]
r = await self._client.execute_command(command, *args, **kwargs) r = await self._client.execute_command(command, *args, **kwargs)
logger.debug(type(r)) # logger.debug(type(r))
logger.debug(r) # logger.debug(r)
return r return r
except Exception as e: except Exception as e:
logger.error(e) logger.error(e)