-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Go into standby if unable to contact OctoPrint #540
Go into standby if unable to contact OctoPrint #540
Conversation
I would rather like OctoPrint to show each error it may encounter. But having a Boot Grace Time might be a good thing. I may slightly refactor this later to only work for the first 60 seconds or so, so OctoPrint has enough time to boot up :) |
…oDash into harleyg321-fix/startup_error
Ok I made the changes locally. Could you maybe check the checkbox “Allow edits from maintainers.”. This would allow me to push them into this PR :) |
Perhaps http requests could have a second attempt after something like 3-5 seconds later if an error is encountered, and only return the error if the second attempt is also not successful (atleast if the status is 0, because of a network error). This would then work not only on boot, but also other situations when network errors are encountered (thinking someone may have octodash and octoprint on two devices, maybe the WiFi drops out intermittently), or atleast slow down the rate of new http error notifications shown. |
It is already checked, not sure if there's anything else I need to do to allow you to commit. |
Mhh, I'll check again tomorrow to see what I did wrong. I basically did a 30 second boot grace time, which will surpress all 0 errors for the first 30 seconds. |
Since I didn't manage to do push into your branch I just created a PR for your branch. After that we can merge this into master :) |
Introduce Boot Grace Time
If unable to connect to OctoPrint (signalled by an error status of 0 suggesting a network error, instead of a http error), go into standby.
Happy for you to close this PR if you would rather give OctoPrint some more time to finish launching when OctoDash starts, rather than going straight to the standby screen.
Fixes #539