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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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