From 8d6ad2c84ffa4c6b6700ee8cde5d600b55d1dc88 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Fri, 2 May 2025 18:04:10 -0300 Subject: [PATCH] refactor(author.py): remove verbose loging in resolver level --- resolvers/author.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/resolvers/author.py b/resolvers/author.py index 8d92cabc..d82fe596 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -314,22 +314,16 @@ async def load_authors_search(_, info, text: str, limit: int = 10, offset: int = list: List of authors matching the search criteria """ - logger.info(f"Executing load_authors_search for text: '{text}', limit: {limit}, offset: {offset}") - # Get author IDs from search engine (already sorted by relevance) search_results = await search_service.search_authors(text, limit, offset) if not search_results: - logger.info(f"No authors found in search for '{text}'") return [] author_ids = [result.get("id") for result in search_results if result.get("id")] if not author_ids: - logger.warning(f"Search for '{text}' returned results but no valid IDs.") return [] - logger.info(f"Search returned {len(author_ids)} author IDs: {author_ids}") - # Fetch full author objects from DB with local_session() as session: # Simple query to get authors by IDs - no need for stats here @@ -337,7 +331,6 @@ async def load_authors_search(_, info, text: str, limit: int = 10, offset: int = db_authors = session.execute(authors_query).scalars().all() if not db_authors: - logger.warning(f"No authors found in DB for IDs: {author_ids}") return [] # Create a dictionary for quick lookup @@ -346,7 +339,6 @@ async def load_authors_search(_, info, text: str, limit: int = 10, offset: int = # Keep the order from search results (maintains the relevance sorting) ordered_authors = [authors_dict[author_id] for author_id in author_ids if author_id in authors_dict] - logger.info(f"Returning {len(ordered_authors)} authors matching search order.") return ordered_authors