change the scale of timeouts to seconds instead of minutes (#739)

This commit is contained in:
bmc-msft
2021-03-26 22:20:10 -04:00
committed by GitHub
parent 324f812bb8
commit fffaab2d25

View File

@ -49,8 +49,8 @@ pub async fn run(args: &clap::ArgMatches<'_>) -> Result<()> {
} }
}; };
if let Some(minutes) = running_duration { if let Some(seconds) = running_duration {
if let Ok(run) = timeout(Duration::from_secs(minutes * 60), run).await { if let Ok(run) = timeout(Duration::from_secs(seconds), run).await {
run run
} else { } else {
info!("The running timeout period has elapsed"); info!("The running timeout period has elapsed");
@ -67,7 +67,7 @@ pub fn args(name: &str) -> App<'static, 'static> {
.arg( .arg(
Arg::with_name(TIMEOUT) Arg::with_name(TIMEOUT)
.long(TIMEOUT) .long(TIMEOUT)
.help("The maximum running time in minutes") .help("The maximum running time in seconds")
.takes_value(true) .takes_value(true)
.required(false), .required(false),
) )