mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 09:05:33 +00:00
explain debug messages
This commit is contained in:
parent
23c7feb85a
commit
7568a9e77d
1 changed files with 7 additions and 3 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -74,7 +74,7 @@ async fn main() -> Result<()> {
|
||||||
let is_expired = t > time_queue - Duration::from_secs(config.ban);
|
let is_expired = t > time_queue - Duration::from_secs(config.ban);
|
||||||
if is_expired {
|
if is_expired {
|
||||||
log::debug!(
|
log::debug!(
|
||||||
"remove `{}` from the ban list by timeout expire ({t})",
|
"remove ban for `{}` by the timeout expiration ({t})",
|
||||||
i.as_string()
|
i.as_string()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -221,13 +221,17 @@ async fn main() -> Result<()> {
|
||||||
}
|
}
|
||||||
Ok(_) => panic!(),
|
Ok(_) => panic!(),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::debug!("failed to resolve torrent `{h}`: `{e}`.");
|
log::debug!(
|
||||||
|
"failed to resolve torrent `{h}`: `{e}`, ban for {} seconds.",
|
||||||
|
config.ban
|
||||||
|
);
|
||||||
assert!(ban.insert(i, Local::now()).is_none());
|
assert!(ban.insert(i, Local::now()).is_none());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::debug!(
|
log::debug!(
|
||||||
"skip awaiting the completion of adding torrent `{h}` data (`{e}`)"
|
"skip awaiting the completion of adding torrent `{h}` data (`{e}`), ban for {} seconds.",
|
||||||
|
config.ban
|
||||||
);
|
);
|
||||||
assert!(ban.insert(i, Local::now()).is_none());
|
assert!(ban.insert(i, Local::now()).is_none());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue