From 14eec9e8329319f11373388cb3f4e17d86e5e97e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 17 Jul 2009 23:59:24 +0200 Subject: [PATCH] add cron command --- lookup/management/__init__.py | 0 lookup/management/commands/__init__.py | 0 lookup/management/commands/cache_ids.py | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 lookup/management/__init__.py create mode 100644 lookup/management/commands/__init__.py create mode 100644 lookup/management/commands/cache_ids.py diff --git a/lookup/management/__init__.py b/lookup/management/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/lookup/management/commands/__init__.py b/lookup/management/commands/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/lookup/management/commands/cache_ids.py b/lookup/management/commands/cache_ids.py new file mode 100644 index 0000000..de45a22 --- /dev/null +++ b/lookup/management/commands/cache_ids.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# vi:si:et:sw=4:sts=4:ts=4 + +from django.core.management.base import BaseCommand, CommandError +from django.conf import settings + + +class Command(BaseCommand): + """ + load new ids into cache + """ + help = 'load ids from sites that dont support search.' + args = '' + + def handle(self, **options): + import oxdata.lookup.cache + lookup.cache.getIds() +