only get posters that where just added
This commit is contained in:
parent
16fe33a877
commit
54f4dff487
1 changed files with 3 additions and 2 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue