-
Notifications
You must be signed in to change notification settings - Fork 5
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
App doesn't check that dwCheckApi is online before searching #6
Comments
dwCheckApi version 2 has an api endpoint for checking the version. We could put fire off a get request to that whilst dwCheckUI is starting up, and await a response. Once a response is received, we can be sure that dwCheckApi is running. We'd have to do something if a response is not received though. |
Part of this work has been carried out in commit e59b7cd. All component specific xhrs use a common xhr method in the base component. This base xhr method performs a check to ensure that the api is running before submitting the xhr. This check needs to be moved to a method which can be called as the component opens, rather than when the user requests an action - that way, while the user it deciding what to do, we can be checking whether the api is running. |
Would you prefer this to happen on app load, or would performing the check on the first call and remembering the result for subsequent calls suffice? Is there ever a need to re-check after the initial check? ( I would assume not, since you're communicating with the service thereafter...) |
I feel like a check during subsequent calls would suffice. |
Because the app doesn't check whether dwCheckApi is online before sending a search, the user is left staring at a "Searching, please wait" message whilst it (dwCheckApi) spins up. This leads to a bad user experience, as all searches are very quick usually.
To get around this, send some kind of small request when any of the search screens loads. When dwCheckApi responds, enable the search controls. If there is no response, display a message to the user saying that functionality has been disabled (or something similar).
While waiting for a response from the server, display a "please wait" type message informing the user that they will have to wait.
Or send a fire and forget request on first load (from the server side code?), which will force dwCheckApi to spin up if it is closed.
Perhaps we need an API endpoint to call on dwCheckApi which will return a status enum (Started OK, Database Issue, +++Out of Cheese Error+++, etc.)
The text was updated successfully, but these errors were encountered: