From 651f2747ee704b149ca59bb5dce6ec2ff05cc5b7 Mon Sep 17 00:00:00 2001 From: Sander Saarend Date: Mon, 10 Jul 2023 18:20:39 +0300 Subject: [PATCH] Only update site_aggregates for local site (#3516) --- src/scheduled_tasks.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduled_tasks.rs b/src/scheduled_tasks.rs index 4d3c936e..a052585e 100644 --- a/src/scheduled_tasks.rs +++ b/src/scheduled_tasks.rs @@ -273,7 +273,7 @@ fn active_counts(conn: &mut PgConnection) { for i in &intervals { let update_site_stmt = format!( - "update site_aggregates set users_active_{} = (select * from site_aggregates_activity('{}'))", + "update site_aggregates set users_active_{} = (select * from site_aggregates_activity('{}')) where site_id = 1", i.1, i.0 ); match sql_query(update_site_stmt).execute(conn) { -- 2.44.1