diff --git a/oxdata/lookup/tasks.py b/oxdata/lookup/tasks.py index ec3f791..8f2a0a0 100644 --- a/oxdata/lookup/tasks.py +++ b/oxdata/lookup/tasks.py @@ -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')