implement ban Item, handle update results outside

This commit is contained in:
yggverse 2025-08-13 19:45:38 +03:00
parent ea0d2b4c67
commit 31087f7936
2 changed files with 21 additions and 7 deletions

View file

@ -61,7 +61,13 @@ async fn main() -> Result<()> {
loop {
let time_queue = Local::now();
log::debug!("queue crawl begin at {time_queue}...");
ban.update(time_queue);
for r in ban.update(time_queue) {
log::debug!(
"remove the ban for `{}` as it has expired on {}",
r.info_hash,
r.expires
)
}
for source in &config.infohash {
log::debug!("index source `{source}`...");
// grab latest info-hashes from this source