chore: shameless excessive temporary debug
too lazy to do this locally because i havent made it mockable yet...
This commit is contained in:
parent
4de0976a22
commit
0a938ca14e
1 changed files with 5 additions and 0 deletions
|
@ -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 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue