Formatting

This commit is contained in:
Aleksei Voronov 2023-09-16 17:40:07 +02:00
parent a11c5446d5
commit fb17aa3e6a
3 changed files with 9 additions and 6 deletions

View File

@ -11,7 +11,10 @@ pub async fn describe_feed_generator(
Json(FeedGeneratorDescription {
did: state.config.service_did.clone(),
feeds: vec![Feed {
uri: format!("at://{}/app.bsky.feed.generator/{}", state.config.publisher_did, "nederlandskie"),
uri: format!(
"at://{}/app.bsky.feed.generator/{}",
state.config.publisher_did, "nederlandskie"
),
}],
links: None,
})

View File

@ -2,9 +2,9 @@ use std::time::Duration;
use anyhow::Result;
use crate::services::AI;
use crate::services::Bluesky;
use crate::services::Database;
use crate::services::AI;
pub struct ProfileClassifier<'a> {
database: &'a Database,

View File

@ -1,6 +1,6 @@
use anyhow::Result;
use chrono::{DateTime, Utc};
use scooby::postgres::{insert_into, select, update, Joinable, Orderable, Parameters, Aliasable};
use scooby::postgres::{insert_into, select, update, Aliasable, Joinable, Orderable, Parameters};
use sqlx::postgres::{PgPool, PgPoolOptions, PgRow};
use sqlx::query;
use sqlx::Row;
@ -62,7 +62,8 @@ impl Database {
let mut params = Parameters::new();
let mut sql_builder = select(("p.indexed_at", "p.author_did", "p.cid", "p.uri"))
.from(
"Post".as_("p")
"Post"
.as_("p")
.inner_join("Profile".as_("pr"))
.on("pr.did = p.author_did"),
)
@ -78,8 +79,7 @@ impl Database {
let sql_string = sql_builder.to_string();
let mut query_object = query(&sql_string)
.bind(author_country);
let mut query_object = query(&sql_string).bind(author_country);
if let Some((last_indexed_at, last_cid)) = earlier_than {
query_object = query_object.bind(last_indexed_at).bind(last_cid);