EyeSeeTea / EReferralsApp

eReferrals blessed repository
GNU General Public License v3.0
0 stars 1 forks source link

online/offline status assessment - mobile data #196

Open BRaimbault opened 5 years ago

BRaimbault commented 5 years ago

Availability endpoint: URL: to be confirmed

{
*to be confirmed*
}

Check when:

ifoche commented 5 years ago

As per @BRaimbault response by email yesterday:

The exact endpoint might change but it will be of the form: [WS_url]/available/

eg. https://apps.psi-mis.org/eRefWSProd/available/

You will be able to use the GET method.

The response to the endpoint will be:

{
   "available": true / false,
   "msg": "A plain text message such as: Available / In Maintenance / Unavailable"  
}

It is not implemented yet, but that should allow you to make progresses.

We start the development using these specifications

ifoche commented 5 years ago

From @BRaimbault 's email on 11-1-19:

Below api endpoint is now available:
https://apps.psi-mis.org/eRefWSProd/api/available
You can also do these:
https://apps.psi-mis.org/eRefWSProd/api/available?detail=Y
https://apps.psi-mis.org/eRefWSProd/api/available?detail=Y&timeout=1000
if 'detail=Y', possible additional information is:
- requestTime, timeoutUsed, wsSettingCacheRefreshed
'wsSettingCacheRefreshed' only shows up if 'wsSetting' cache were refreshed due to timeout or user request, thus, took a bit more time to response on this api endpoint.

The endpoint app side need to be changed to introduce /api

BRaimbault commented 5 years ago

Hi Ignacio,

I have a change to suggest here which is to have two different timeout depending on whether we are doing a hard or soft login. It can be very difficult to do a hard login currently if the dhis2 server is a bit slow in answering.

Can we try with:

What do you think?

We probably need to spend a bit more time testing and adjusting this...

ifoche commented 5 years ago

@BRaimbault regarding this...do you mean the timeout with the auth endpoint? We have been since the last versions forced to continuously increase the timeout in any call to the WS because it was continuously failing. Now it's scaled up to 50 seconds. In the other hand, the webpages requested by the webviews have a timeout of 15 seconds now. In the last few days even with those numbers we're still having timeouts.

So my question would be...when you mention these timeouts, you mean the timeout with the auth endpoint, right? I think anything like your proposal would imply a constant timeout error if nothing changes server side

ifoche commented 5 years ago

As per our conversation today, soft login authentication endpoint timeout will be changed 5000ms (better copy the previous timeout with DHIS2 authentication)