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/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%24%7B%60data:application/static/%7B%60https:/%7BpictrsAvatarThumbnail%28community.icon%29%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) {