mirror of
https://github.com/YGGverse/btracker.git
synced 2026-03-31 17:15:31 +00:00
cleanup tmp folder after preload data resolve
This commit is contained in:
parent
de0747366d
commit
6119510a23
1 changed files with 3 additions and 2 deletions
|
|
@ -110,7 +110,6 @@ async fn main() -> Result<()> {
|
||||||
if config.debug {
|
if config.debug {
|
||||||
println!("\t\tIndex `{i}`...")
|
println!("\t\tIndex `{i}`...")
|
||||||
}
|
}
|
||||||
preload.clear();
|
|
||||||
// run the crawler in single thread for performance reasons,
|
// run the crawler in single thread for performance reasons,
|
||||||
// use `timeout` argument option to skip the dead connections.
|
// use `timeout` argument option to skip the dead connections.
|
||||||
match time::timeout(
|
match time::timeout(
|
||||||
|
|
@ -261,10 +260,12 @@ async fn main() -> Result<()> {
|
||||||
session
|
session
|
||||||
.delete(librqbit::api::TorrentIdOrHash::Id(id), false)
|
.delete(librqbit::api::TorrentIdOrHash::Id(id), false)
|
||||||
.await?;
|
.await?;
|
||||||
|
// cleanup tmp
|
||||||
|
preload.clear();
|
||||||
if config.debug {
|
if config.debug {
|
||||||
println!("\t\t\tadd `{i}` to index.")
|
println!("\t\t\tadd `{i}` to index.")
|
||||||
}
|
}
|
||||||
|
// skip processed torrent on the next iteration
|
||||||
assert!(processed.insert(i))
|
assert!(processed.insert(i))
|
||||||
}
|
}
|
||||||
Ok(_) => panic!(),
|
Ok(_) => panic!(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue