@danstoner discovered that sometimes this page:
https://www.idigbio.org/portal/publishers
shows 0 for the "API" portion of the stats (both summary and by-publisher).
Sometimes, reloading will show an appropriate response. You can see the network request come back with an empty result set when 0s appear.
My hunch is a a timeout/race condition, as the search consistently returns results, but the response times are 400-1200ms.
app/controllers/publishers.js calls "render" on publishers.
which includes a parallel async call like this in the script:
idbapi.summary('stats/api',{inverted: "true",minDate:"now-1d"},function(resp){
an equivalent curl request is:
curl --location --request POST 'search.idigbio.org/v2/summary/stats/api' \
--header 'Content-Type: text/plain' \
--data-raw '{inverted: "true",minDate:"now-1d"}'
@danstoner discovered that sometimes this page:
https://www.idigbio.org/portal/publishers
shows 0 for the "API" portion of the stats (both summary and by-publisher).
Sometimes, reloading will show an appropriate response. You can see the network request come back with an empty result set when 0s appear.
My hunch is a a timeout/race condition, as the search consistently returns results, but the response times are 400-1200ms.
app/controllers/publishers.jscalls "render" on publishers.which includes a parallel async call like this in the script:
an equivalent curl request is: