From bbb84a9cc1da6fa362e06bb589fc8a1b88ad8980 Mon Sep 17 00:00:00 2001 From: Robbie Coomber Date: Thu, 20 Jun 2024 13:41:39 +0100 Subject: [PATCH] Show last select query instead of first --- posthog/management/commands/backfill_raw_sessions_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posthog/management/commands/backfill_raw_sessions_table.py b/posthog/management/commands/backfill_raw_sessions_table.py index daf4678b1c557e..6d15e5b269d3ca 100644 --- a/posthog/management/commands/backfill_raw_sessions_table.py +++ b/posthog/management/commands/backfill_raw_sessions_table.py @@ -72,7 +72,7 @@ def select_query(select_date: Optional[datetime] = None, team_id=None) -> str: count_query = f"SELECT count(), uniq(session_id_v7) FROM ({select_query()})" [(events_count, sessions_count)] = sync_execute(count_query, settings=SETTINGS) logger.info(f"{events_count} events and {sessions_count} sessions to backfill for") - logger.info(f"The first select query would be:\n{select_query(self.start_date)}") + logger.info(f"The first select query to run would be:\n{select_query(self.end_date)}") return for i in reversed(range(num_days)):