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
How can I check the progress of a script.Exec() command? #176
Comments
You can use script.Exec("/home/aaron/big-script.sh").Wait() Alternatively, if the script produces output, you can copy it to the terminal while waiting: script.Exec("/home/aaron/big-script.sh").Stdout() |
One of the things I like to do when waiting for a long time is let the users know. -- hey it's gonna take a few. then I give it a spinner. This gives the impression that the computer or process didn't lockup -- that it's working on it. There are many different spinner functions, but test first not all of them work well with the user's terminal such as putty.
Spinner Function:
|
I have a long running Exec() query:
This command takes a long time, but is always successful.
How can I check the progress of this Exec query? How do I know if it's still in-progress, or has finished running it's command?
I don't think I can check the exit status of the Pipe (as far as I can see), because that will only be set if there's an error
The text was updated successfully, but these errors were encountered: