DPGAlliance / publicgoods-scripts

Scripts to generate static site from WordPress
http://digitalpublicgoods.net
MIT License
4 stars 6 forks source link

[DPG Map] Sometimes DPGs are not loading #93

Closed edil-it-them closed 1 year ago

edil-it-them commented 2 years ago

I looked into CI builds and found that sometimes DPG data is missing https://digitalpublicgoods.net/map/ My guess is that script fetches data through github search API which has some limits. Suggestion Need to change the way how we retrieve data here from fetch to fs.readdir and fs.readfile since we are cloning publicgoods-candidates repo on every build path.join(process.cwd(), "../../../publicgoods-candidates/digitalpublicgoods"); path.join(process.cwd(), "../../../publicgoods-candidates/nominees");

nathanfletcher commented 2 years ago

While looking into this, my hunch was that we may have been hitting a rate limit on the GitHub API that pulls the data; which may have been a reason some DPG data would not load. However, on second thought the GitHub API has a rate limit of 15k rph which makes me doubt that we actually hit that (though it is not totally impossible). There may be another reason why DPGs do not sometimes load in this issue claim. However, the suggestion is a fair improvement on the code.

nathanfletcher commented 1 year ago

Closing issues as the source of DPG data has been changed from GH to a new database API