mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 17:15:35 +00:00
add debug events
This commit is contained in:
parent
c80d5076cc
commit
2c6b523738
1 changed files with 4 additions and 1 deletions
|
|
@ -170,16 +170,19 @@ async fn main() -> Result<()> {
|
||||||
})?;
|
})?;
|
||||||
session.update_only_files(&mt, &only_files).await?;
|
session.update_only_files(&mt, &only_files).await?;
|
||||||
session.unpause(&mt).await?;
|
session.unpause(&mt).await?;
|
||||||
|
log::debug!("begin torrent `{i}` preload...");
|
||||||
// await for `preload_regex` files download to continue
|
// await for `preload_regex` files download to continue
|
||||||
mt.wait_until_completed().await?;
|
mt.wait_until_completed().await?;
|
||||||
|
log::debug!("begin torrent `{i}` preload completed.");
|
||||||
// persist torrent bytes and preloaded content,
|
// persist torrent bytes and preloaded content,
|
||||||
// cleanup tmp (see rqbit#408)
|
// cleanup tmp (see rqbit#408)
|
||||||
|
log::debug!("persist data for torrent `{i}`...");
|
||||||
preload.commit(&i, bytes, Some(keep_files))?;
|
preload.commit(&i, bytes, Some(keep_files))?;
|
||||||
// remove torrent from session as indexed
|
// remove torrent from session as indexed
|
||||||
session
|
session
|
||||||
.delete(librqbit::api::TorrentIdOrHash::Id(id), false)
|
.delete(librqbit::api::TorrentIdOrHash::Id(id), false)
|
||||||
.await?;
|
.await?;
|
||||||
log::debug!("torrent `{i}` indexed.")
|
log::debug!("torrent `{i}` resolved.")
|
||||||
}
|
}
|
||||||
Ok(_) => panic!(),
|
Ok(_) => panic!(),
|
||||||
Err(e) => log::debug!("Failed to resolve `{i}`: `{e}`."),
|
Err(e) => log::debug!("Failed to resolve `{i}`: `{e}`."),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue