Nicer "failure only occured X ago" message

This commit is contained in:
Tom Parker-Shemilt 2020-03-26 23:29:34 +00:00
parent d4b44fd6d5
commit 60e614f51e
2 changed files with 3 additions and 2 deletions

View file

@ -21,4 +21,5 @@ async-std = "1"
log = "0.4"
regex = "1"
scraper = "0.11"
chrono = { version = "0.4", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
chrono-humanize = "0.0.11"

View file

@ -352,7 +352,7 @@ async fn main() -> Result<(), Error> {
println!("{:?}", link);
failed +=1;
} else {
println!("Failure occurred but only {} ago, so we're not worrying yet: {}", since, msg);
println!("Failure occurred but only {}, so we're not worrying yet: {}", chrono_humanize::HumanTime::from(-since), msg);
}
}
}