Skip to content
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

Merged
merged 6 commits into from
Apr 9, 2020

Conversation

harleyg321
Copy link
Contributor

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

@UnchartedBull
Copy link
Owner

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 :)

@UnchartedBull
Copy link
Owner

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 :)

@harleyg321
Copy link
Contributor Author

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.

@harleyg321
Copy link
Contributor Author

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 :)

It is already checked, not sure if there's anything else I need to do to allow you to commit.

@UnchartedBull
Copy link
Owner

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.

@UnchartedBull
Copy link
Owner

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 :)

@UnchartedBull UnchartedBull merged commit 25523db into UnchartedBull:master Apr 9, 2020
@harleyg321 harleyg321 deleted the fix/startup_error branch April 9, 2020 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error always received on startup
2 participants