only get posters that where just added

This commit is contained in:
j 2010-08-10 12:19:52 +02:00
parent 16fe33a877
commit 54f4dff487

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from datetime import timedelta
from datetime import timedelta, datetime
from celery.decorators import task, periodic_task
@ -11,8 +11,9 @@ import poster.models
@periodic_task(run_every=timedelta(days=1))
def cronjob(**kwargs):
before_import = datetime.now()
cache.getIds()
for p in poster.models.PosterCache.objects.filter(image='', failed=False):
for p in poster.models.PosterCache.objects.filter(image='', failed=False, created__gt=before_import):
p.get()
@task(ignore_resulsts=True, queue='default')