-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds zini restart subcommand #55
Conversation
Signed-off-by: Ashraf Fouda <[email protected]>
src/app/mod.rs
Outdated
let mut count = 0; | ||
while count <= 20 { | ||
let result = client.status(name).await?; | ||
if result.state == "Success" && result.target == "Down" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it's better to check the PID not the state, because the stat can still be Error or other when it's stopped bardo
src/app/mod.rs
Outdated
client.start(name).await?; | ||
return Ok(()); | ||
} | ||
time::sleep(std::time::Duration::from_secs(2)).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we wait for 40 seconds? isn't this a bit too long?
I say we try every 1 second instead of 2
src/app/mod.rs
Outdated
return Ok(()); | ||
} | ||
time::sleep(std::time::Duration::from_secs(2)).await; | ||
count += 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when u switch to for
u won't need this
Signed-off-by: Ashraf Fouda <[email protected]>
Signed-off-by: Ashraf Fouda <[email protected]>
Signed-off-by: Ashraf Fouda <[email protected]>
No description provided.