cache posters in celery/cronjob
This commit is contained in:
parent
6344be480e
commit
16fe33a877
1 changed files with 4 additions and 1 deletions
|
@ -6,11 +6,14 @@ from celery.decorators import task, periodic_task
|
||||||
|
|
||||||
import models
|
import models
|
||||||
import cache
|
import cache
|
||||||
|
import poster.models
|
||||||
|
|
||||||
|
|
||||||
@periodic_task(run_every=timedelta(days=1))
|
@periodic_task(run_every=timedelta(days=1))
|
||||||
def cronjob(**kwargs):
|
def cronjob(**kwargs):
|
||||||
print "do some cleanup stuff once a day"
|
|
||||||
cache.getIds()
|
cache.getIds()
|
||||||
|
for p in poster.models.PosterCache.objects.filter(image='', failed=False):
|
||||||
|
p.get()
|
||||||
|
|
||||||
@task(ignore_resulsts=True, queue='default')
|
@task(ignore_resulsts=True, queue='default')
|
||||||
def updateImdb(id):
|
def updateImdb(id):
|
||||||
|
|
Loading…
Reference in a new issue