v1.7.0 - hotfix (#611)

feat(chalice): fixed get null-duration-session
This commit is contained in:
Kraiem Taha Yassine 2022-07-15 14:51:57 +02:00 committed by Shekar Siri
parent e5fcd52686
commit 76aba00abe
2 changed files with 4 additions and 0 deletions

View file

@ -4,6 +4,8 @@ from decouple import config
def get_by_session_id(session_id, project_id, start_ts, duration):
with pg_client.PostgresClient() as cur:
if duration is None or (type(duration) != 'int' and type(duration) != 'float') or duration < 0:
duration = 0
delta = config("events_ts_delta", cast=int, default=60 * 60) * 1000
ch_query = """\
SELECT

View file

@ -6,6 +6,8 @@ from decouple import config
def get_by_session_id(session_id, project_id, start_ts, duration):
with ch_client.ClickHouseClient() as ch:
if duration is None or (type(duration) != 'int' and type(duration) != 'float') or duration < 0:
duration = 0
delta = config("events_ts_delta", cast=int, default=60 * 60) * 1000
ch_query = """\
SELECT