mathdroid / covid-19-api

COVID-19 global data (from JHU CSSE for now) as-a-service
https://covid19.mathdro.id
1.36k stars 283 forks source link

fix daily summary endpoint #307

Closed hendrasan closed 3 years ago

hendrasan commented 3 years ago

Should fix #303 but not sure if it will break when there are more daily data in the future.

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mathdroid/covid19/k5dw53aff
✅ Preview: https://covid19-git-84e900b0efb29fd98f33e25a22dd8c9d440f4b45.mathdroid.vercel.app

hendrasan commented 3 years ago

Nevermind, worked in my machine but failed in production 😅

hendrasan commented 3 years ago

The problem is the endpoint timed out. It's probably because the John Hopkins API takes up to 8-10 seconds per request, more than the 10 seconds allowed by Vercel Hobby plan.

Maybe you should break the endpoint to only show X latest records or something

npankov commented 3 years ago

The problem is the endpoint timed out. It's probably because the John Hopkins API takes up to 8-10 seconds per request, more than the 10 seconds allowed by Vercel Hobby plan.

Maybe you should break the endpoint to only show X latest records or something

as a result it's work?

k1m0ch1 commented 3 years ago

@hendrasan so it is not working, I'll close this PR if not working.

k1m0ch1 commented 3 years ago

fixed in https://github.com/mathdroid/covid-19-api/pull/315