diff --git a/resolvers/author.py b/resolvers/author.py index 8d4ba22b..64135767 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -183,7 +183,7 @@ async def get_author_follows(_, _info, slug='', user=None, author_id=0): [author] = result # logger.debug(author) if author and isinstance(author, Author): - logger.debug(author.dict()) + # logger.debug(author.dict()) author_id = author.id rkey = f'author:{author_id}:follows-authors' logger.debug(f'getting {author_id} follows authors') diff --git a/services/db.py b/services/db.py index d929571e..8d54858a 100644 --- a/services/db.py +++ b/services/db.py @@ -92,7 +92,6 @@ warnings.simplefilter('always', exc.SAWarning) @event.listens_for(Engine, 'before_cursor_execute') def before_cursor_execute(conn, cursor, statement, parameters, context, executemany): conn.query_start_time = time.time() - conn.statement = statement # noinspection PyUnusedLocal @@ -106,6 +105,6 @@ def after_cursor_execute(conn, cursor, statement, parameters, context, executema if parameters else f'{statement}'.replace('\n', ' ') ) - if elapsed > 1 and conn.executed_statement != conn.statement: + if elapsed > 1 and str(conn.last_executed_statement()) != str(statement): conn.executed_statement = conn.statement logger.debug(f"\n{query}\n{'*' * math.floor(elapsed)} {elapsed:.3f} s\n")