sbehrends / Live-WorldCup-Notification-for-Slack

World Cup 2014 notifications via Slack
20 stars 10 forks source link

FIFA API "expires" property #16

Closed Cyborg572 closed 6 years ago

Cyborg572 commented 10 years ago

The json returned from the api has an "expires" property set. It looks like it's usually about 15 seconds after the "last modified" time, and seems to indicate the next time the data is set to update.

It might be worthwhile to wait until the expires time to poll the api again instead of hitting it every 5 seconds, as this could potentially reduce the chance of getting ECONNRESET errors.

At the very least, changing the cron job to every 15 seconds instead of every 5 could help.

sbehrends commented 10 years ago

Good idea