Closed orar closed 5 years ago
If app goes offline, api response is not justified at that moment but an unhealthy action is issued which puts the app into maintenance mode.
This is the desired behavior. If the backend goes down, then the frontend cannot work properly. So it goes in maintenance mode.
If Play is down, all functionalities of app are seized. This behavior will be least manifested by network partitioning or transient offline based on several network issues. I think it can be enhanced (maybe with retries or counter) a little to make concrete justification.
I'm closing this for now.
The current relation of Health and Maintenance is health pulls from api and sets its
isHealthy
status totrue
orfalse
. This contributes to causing maintenance mode.isHealthy: false
), app goes for maintenance. That's fine. If app goes offline, api response is not justified at that moment but an unhealthy action is issued which puts the app into maintenance mode.Currently there are only 3 reducer actions for
HealthModule
:fetchHealth
(Pending
,Fulfilled
,Rejected
).I add a fourth neutral action (
fetchHealthFailed
) which only sets healthyisPending
state tofalse
without altering theisHealthy
status if response cannot be justified until connection is restored or app closed to cancel health polling.Can start React app without Play server or simulate browser offline to reproduce.