-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
[BUG/FEATURE?] "Command" should have a timeout associated with it... #88
Comments
Thanks! Looks like you fixed all the "bugs" I referenced :) |
BTW, any idea when you might push the next release containing the bug fixes you reference? |
Should be fixed now: https://github.com/LazeMSS/OctoPrint-TopTemp/releases/tag/0.0.2.1 |
Thanks! Works!! |
Actually, it doesn't work for some commands. Note this may be related to #93 (see details there) |
Actually, doesn't seem to be working. Even worse, 'sleep N && echo 99' properly displays '99' after an N second delay when N < 30 (i.e., sleep time is less than the 30 second default timeout in your code)). So it seems like the process is presumably timing out in init.py but but somehow control is not returning to the configuration dialog box. |
Here is the error code in the log that happens when the timeout is triggered. 2023-05-15 14:26:53,499 - octoprint.plugins.toptemp - WARNING - "sleep 30 && echo 10" timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Here is a patch to correct the error which seems to be caused by incorrect/confused concatenation of strings in the multiple returned values. I fixed it by using an f-string instead of '+' concatenation.
|
Has this patch been added yet? |
If the command for a "Custom" display hangs, then bad things seem to happen...
First, the 'testing' itself hangs
Second and more ominously, it seems like Octoprint is waiting for the function to complete which seems to prevent other Octoprint functions from running, including refreshing the Octoprint webui.
I could not even restart Octoprint from the webui (though it gave me the confirmatory dialog box, it failed to execute a restart) or even from the command line using "octoprint daemon stop" or "octoprint daemon restart"
I had to manually "kill -KILL" (i.e., kill -9)) the process to get it to stop and then had to restart manually from the command line.
Suggest either a fixed or a manually settable timeout. Also, ideally, the 'Test' button should have the ability to abort/start over if you press 'Test' again in case you don't want to wait for the timeout (or infinitely long if it hangs without a timeout capacity)
You can test this by giving "sleep 100000" as the command...
The text was updated successfully, but these errors were encountered: