This commit is contained in:
parent
9bda7cef95
commit
e9be761420
|
@ -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')
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user