diff --git a/oxdata/movie/management/commands/cache_imdb_ids.py b/oxdata/movie/management/commands/cache_imdb_ids.py new file mode 100644 index 0000000..8b73068 --- /dev/null +++ b/oxdata/movie/management/commands/cache_imdb_ids.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# vi:si:et:sw=4:sts=4:ts=4 + +from django.core.management.base import BaseCommand + +import movie.models + +class Command(BaseCommand): + """ + load new ids into cache + """ + help = 'load ids from sites that dont support search.' + args = '' + + def handle(self, **options): + timeout = 30*24*60*60 + movie.models.get_new_ids(timeout)