Skip to content

"API" section of publishers page stats sometimes shows 0 #17

Description

@roncanepa

@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"}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions