Parakeet is a Rust-based Bluesky AppServer aiming to implement most of the functionality required to support the Bluesky client
appview atproto bluesky rust appserver

stop trying to return rows we don't have

+11 -4
+5 -1
consumer/src/indexer/db.rs
··· 106 106 .await 107 107 } 108 108 109 - pub async fn delete_follow(conn: &mut AsyncPgConnection, at_uri: &str) -> QueryResult<String> { 109 + pub async fn delete_follow( 110 + conn: &mut AsyncPgConnection, 111 + at_uri: &str, 112 + ) -> QueryResult<Option<String>> { 110 113 diesel::delete(schema::follows::table) 111 114 .filter(schema::follows::at_uri.eq(at_uri)) 112 115 .returning(schema::follows::subject) 113 116 .get_result(conn) 114 117 .await 118 + .optional() 115 119 } 116 120 117 121 pub async fn update_follow_stats(
+6 -3
consumer/src/indexer/mod.rs
··· 178 178 match collection { 179 179 CollectionType::BskyBlock => db::delete_block(conn, &full_path).await?, 180 180 CollectionType::BskyFollow => { 181 - let subject = db::delete_follow(conn, &full_path).await?; 182 - db::update_follow_stats(conn, &[repo, &subject]).await? 183 - }, 181 + if let Some(subject) = db::delete_follow(conn, &full_path).await? { 182 + db::update_follow_stats(conn, &[repo, &subject]).await? 183 + } else { 184 + 0 185 + } 186 + } 184 187 _ => unreachable!(), 185 188 }; 186 189 } else {