Api v1.15.0 (#1585)

* refactor(chalice): disable path analysis query log
This commit is contained in:
Kraiem Taha Yassine 2023-10-27 15:46:24 +02:00 committed by GitHub
parent 248734a12d
commit 013cf5d1be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -414,7 +414,7 @@ WITH {initial_event_cte}
SELECT *
FROM pre_ranked_events;"""
ch.execute(query=ch_query1, params=params)
if True or time() - _now > 2:
if time() - _now > 2:
logger.warning(f">>>>>>>>>PathAnalysis long query EE ({int(time() - _now)}s)<<<<<<<<<")
logger.warning("---------Q1-----------")
logger.warning(ch.format(ch_query1, params))
@ -441,7 +441,7 @@ WITH pre_ranked_events AS (SELECT *
SELECT *
FROM ranked_events;"""
ch.execute(query=ch_query2, params=params)
if True or time() - _now > 2:
if time() - _now > 2:
logger.warning(f">>>>>>>>>PathAnalysis long query EE ({int(time() - _now)}s)<<<<<<<<<")
logger.warning("---------Q2-----------")
logger.warning(ch.format(ch_query2, params))
@ -457,7 +457,7 @@ FROM ({" UNION ALL ".join(projection_query)}) AS chart_steps
ORDER BY event_number_in_session;"""
rows = ch.execute(query=ch_query3, params=params)
if True or time() - _now > 2:
if time() - _now > 2:
logger.warning(f">>>>>>>>>PathAnalysis long query EE ({int(time() - _now)}s)<<<<<<<<<")
logger.warning("---------Q3-----------")
logger.warning(ch.format(ch_query3, params))