pythonkc / pythonkc-com

Django app for pythonkc.com.
18 stars 15 forks source link

Move Meetup data retrieval to a task #8

Open estebistec opened 12 years ago

estebistec commented 12 years ago

I think gondor supports some sort of worker or task concept. If so, that should be used to periodically refresh the meetup data for the home page. Currently, the first user to hit the page after cache expiry takes the hit.

estebistec commented 12 years ago

Got an error-log email from the site on 9/23 wherein the call to meetup.com timed out. If this were a task such an error would never be seen by site visitors.

estebistec commented 12 years ago

Gondor supports tasks now, but not scheduled tasks. Probably better to wait for that.

[1] https://gondor.io/support/celery/

paulproteus commented 11 years ago

For what it's worth: one very easy way to handle this is to have a Django view that simply executes the task and returns e.g. the string "OK". (or "KC" if you want to get confusingly specific to PythonKC) (-:

Then you "just", on any random server you have on the Internet, or from ifttt.com, configure a periodic task to visit that URL.

estebistec commented 11 years ago

Right, or pingdom. Writing the task itself isn't really hard either, this is just how far down my priority list it is (wow, 2 years :/)