Skip to content

Fix current statistics pipline fro journals. #29

@Andrei-Dolgolev

Description

@Andrei-Dolgolev

Reported by @kompotkot

Feb 01 15:10:34 ip-1 drones-statistics[111680]: wau AS
Feb 01 15:10:34 ip-1 drones-statistics[111680]: (SELECT clients_events.created_at_week AS created_at_week, count(distinct(clients_events.client)) AS wau
Feb 01 15:10:34 ip-1 drones-statistics[111680]: FROM clients_events GROUP BY created_at_week),
Feb 01 15:10:34 ip-1 drones-statistics[111680]: transitions AS
Feb 01 15:10:34 ip-1 drones-statistics[111680]: (SELECT week1.client AS client, week2.client AS client_redundant, week1.created_at_week AS week1, week2.created_at_week AS week2
Feb 01 15:10:34 ip-1 drones-statistics[111680]: FROM clients_events AS week1 JOIN clients_events AS week2 ON week2.created_at_week = week1.created_at_week + %(created_at_week_1)s AND week2.client = week1.client)
Feb 01 15:10:34 ip-1 drones-statistics[111680]:  SELECT wau.created_at_week AS week, wau.wau AS wau, count(distinct(transitions.client)) AS num_returning_clients
Feb 01 15:10:34 ip-1 drones-statistics[111680]: FROM wau LEFT OUTER JOIN transitions ON transitions.week2 = wau.created_at_week GROUP BY wau.created_at_week, wau.wau]
Feb 01 15:10:34 ip-1 drones-statistics[111680]: [parameters: {'date_trunc_1': 'week', 'journal_id_1': UUID('c7'), 'tag_1': 'client:%', 'created_at_1': datetime.datetime(2023, 1, 26, 15, 10, 4, 153751), 'created_at_week_1': datetime.timedelta(days=7)}]
Feb 01 15:10:34 ip-1 drones-statistics[111680]: (Background on this error at: https://sqlalche.me/e/20/e3q8)
Feb 01 15:12:06 ip-1 drones-statistics[111680]: ERROR:drones.statistics:Generate session statistics end with error:(psycopg2.errors.QueryCanceled) canceling statement due to statement timeout

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions