Running “unique” tasks with celery
I use celery to update RSS feeds in my news aggregation site. I use one @task for each feed, and things seem to work nicely. There's a detail that I'm not sure to handle well though: all feeds are updated once every minute with a @periodic_task, but what if a feed is still updating from the last periodic task when a new one is started ? (for example if the feed is really slow, or offline and the task is held in a retry loop) Currently I store tasks results and check their status like this: import socket from datetime import timedelta from celery.decorators import task, periodic_task from