From: Sander Saarend Date: Mon, 10 Jul 2023 15:20:39 +0000 (+0300) Subject: Only update site_aggregates for local site (#3516) X-Git-Url: http://these/git/%22https:/nerdica.net/photo/contact/80/%24%7BappleTouchIcon%7D?a=commitdiff_plain;h=651f2747ee704b149ca59bb5dce6ec2ff05cc5b7;p=lemmy.git Only update site_aggregates for local site (#3516) --- 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) {