mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 17:15:35 +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);
|
||||
if is_expired {
|
||||
log::debug!(
|
||||
"remove `{}` from the ban list by timeout expire ({t})",
|
||||
"remove ban for `{}` by the timeout expiration ({t})",
|
||||
i.as_string()
|
||||
)
|
||||
}
|
||||
|
|
@ -221,13 +221,17 @@ async fn main() -> Result<()> {
|
|||
}
|
||||
Ok(_) => panic!(),
|
||||
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());
|
||||
}
|
||||
},
|
||||
Err(e) => {
|
||||
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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue