Rather than doing a request every time for Fedora magazine, we are just going to get a snapshot from the website. Since the website is rebuilt every hour, this shouldn't cause problem.
Fix https://pagure.io/fedora-web/websites/issue/56
I didn't test yet, but going to work now the code is out there.
rebased onto 06aa2abdf122da935045e604505436e2d3c2650f
Ok, so I tested, it seems to work. It only solve the issue for the main API call, so this should remove ~180 000 API calls. I need to do something for the 2nd one, likely the same trick.
1 new commit added
Pregenerate a json file instead of doing API calls for image
So, now, the website is using 1 json call with all information. I kept the javascript for the widget, due to date conversion and because it was easier than redo everything, but that's likely something to see too.
I think the documentation should also be fixed, but after that PR is merged
Pull-Request has been merged by pfrields
Seems the CSP policy blocked the patch, I have merged a fix, waiting on deployment for now
Rather than doing a request every time for Fedora magazine,
we are just going to get a snapshot from the website. Since the
website is rebuilt every hour, this shouldn't cause problem.
Fix https://pagure.io/fedora-web/websites/issue/56