cache posters in celery/cronjob

This commit is contained in:
j 2010-08-09 19:55:50 +02:00
parent 6344be480e
commit 16fe33a877

View file

@ -6,11 +6,14 @@ from celery.decorators import task, periodic_task
import models
import cache
import poster.models
@periodic_task(run_every=timedelta(days=1))
def cronjob(**kwargs):
print "do some cleanup stuff once a day"
cache.getIds()
for p in poster.models.PosterCache.objects.filter(image='', failed=False):
p.get()
@task(ignore_resulsts=True, queue='default')
def updateImdb(id):