From f7855147ce2d5bb80a5e2dd64a399c1f9ebc6654 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 6 Mar 2016 15:48:47 +0530 Subject: [PATCH] add cache_imdb_ids --- .../movie/management/commands/cache_imdb_ids.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 oxdata/movie/management/commands/cache_imdb_ids.py 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)