From a12566bc056fd7fceb3bed22b9b78c8e9f24eb17 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Thu, 13 Aug 2015 16:58:35 -0300 Subject: [PATCH] Data import moved to celery --- colab/plugins/management/__init__.py | 0 colab/plugins/management/commands/__init__.py | 0 colab/plugins/management/commands/import_proxy_data.py | 31 ------------------------------- 3 files changed, 0 insertions(+), 31 deletions(-) delete mode 100644 colab/plugins/management/__init__.py delete mode 100644 colab/plugins/management/commands/__init__.py delete mode 100644 colab/plugins/management/commands/import_proxy_data.py diff --git a/colab/plugins/management/__init__.py b/colab/plugins/management/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/colab/plugins/management/__init__.py +++ /dev/null diff --git a/colab/plugins/management/commands/__init__.py b/colab/plugins/management/commands/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/colab/plugins/management/commands/__init__.py +++ /dev/null diff --git a/colab/plugins/management/commands/import_proxy_data.py b/colab/plugins/management/commands/import_proxy_data.py deleted file mode 100644 index 9862654..0000000 --- a/colab/plugins/management/commands/import_proxy_data.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python - -import importlib -import inspect - -from django.core.management.base import BaseCommand -from django.conf import settings - -from colab.plugins.utils.proxy_data_api import ProxyDataAPI - - -class Command(BaseCommand): - help = "Import proxy data into colab database" - - def handle(self, *args, **kwargs): - print "Executing extraction command..." - - for module_name in settings.PROXIED_APPS.keys(): - module_path = \ - 'colab.plugins.{}.data_api'.format(module_name.split('.')[-1]) - module = importlib.import_module(module_path) - - for module_item_name in dir(module): - module_item = getattr(module, module_item_name) - if not inspect.isclass(module_item): - continue - if issubclass(module_item, ProxyDataAPI): - if module_item != ProxyDataAPI: - api = module_item() - api.fetch_data() - break -- libgit2 0.21.2