opencaching / opencaching-pl

The source code of Opencaching.PL (and some other domains)
https://opencaching.pl/
GNU General Public License v3.0
22 stars 33 forks source link

Geokrety cron does not handle too old lastupdate #2400

Open andrixnet opened 1 year ago

andrixnet commented 1 year ago

OC Geokrety cron stores a lastupdated in table sysconfig. Geokrety API allows queries for at most 10 days in the past. OC Geokrety cron job does not implement checks on feeding the API an acceptable date.

Giving the API a too old date results in an error message, not the expected XML. Server admin has to intervene and manually change the entry in the database.

I propose that the cron job do date verifications and if a too old date is found in the database, to request from the API the maximum allowed, and perhaps to make a cleanup in the OC database regarding geokrety before running the API and log the situation, rather then a hard fail with emails every 5 minutes as it does now in this context.

Thank you.