chore: shameless excessive temporary debug

too lazy to do this locally because i havent made it mockable yet...
This commit is contained in:
əlemi 2024-11-10 22:29:06 +01:00
parent 4de0976a22
commit 0a938ca14e
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -404,13 +404,17 @@ impl Fetcher for crate::Context {
async fn fetch_thread(&self, id: &str, tx: &impl ConnectionTrait) -> Result<(), RequestError> { async fn fetch_thread(&self, id: &str, tx: &impl ConnectionTrait) -> Result<(), RequestError> {
tracing::info!("crawling replies of '{id}'"); tracing::info!("crawling replies of '{id}'");
let object = self.pull(id).await?.object()?; let object = self.pull(id).await?.object()?;
tracing::info!("pulled object {object:?}");
let replies = object.replies().resolve(self).await?; let replies = object.replies().resolve(self).await?;
tracing::info!("resolved replies {replies:?}");
let mut page; let mut page;
let mut next = replies.first(); let mut next = replies.first();
tracing::info!("first next: {next:?}");
loop { loop {
page = next.resolve(self).await?; page = next.resolve(self).await?;
tracing::info!("resolved next page: {page:?}");
// fix for mastodon: at some point it introduces ?only_other_accounts=true and then returns a // fix for mastodon: at some point it introduces ?only_other_accounts=true and then returns a
// collection, not a page anymore ??? // collection, not a page anymore ???
@ -431,6 +435,7 @@ impl Fetcher for crate::Context {
} }
next = page.next(); next = page.next();
tracing::info!("next page: {next:?}");
if next.is_empty() { break }; if next.is_empty() { break };
} }