Commit a9681e59e2b600b16271238d9bd82ebd539f4b4a
1 parent
b588f3b4
Exists in
proxy_hotspot
Fix import_data
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
colab/proxy/management/commands/import_proxy_data.py
| 1 | 1 | #!/usr/bin/env python |
| 2 | 2 | |
| 3 | 3 | import importlib |
| 4 | +import inspect | |
| 4 | 5 | |
| 5 | 6 | from django.core.management.base import BaseCommand |
| 6 | 7 | from django.conf import settings |
| ... | ... | @@ -20,7 +21,10 @@ class Command(BaseCommand): |
| 20 | 21 | |
| 21 | 22 | for module_item_name in dir(module): |
| 22 | 23 | module_item = getattr(module, module_item_name) |
| 24 | + if not inspect.isclass(module_item): | |
| 25 | + continue | |
| 23 | 26 | if issubclass(module_item, ProxyDataAPI): |
| 24 | 27 | if module_item != ProxyDataAPI: |
| 25 | 28 | api = module_item() |
| 26 | 29 | api.fetchData() |
| 30 | + break | ... | ... |
colab/proxy/utils/plugin.py
| ... | ... | @@ -34,7 +34,7 @@ class ColabPlugin(object): |
| 34 | 34 | |
| 35 | 35 | Example of code hotspot, might be called somewhere in the code from: |
| 36 | 36 | |
| 37 | - from colab.proxy.proxy.plugin import plugin_hotspot | |
| 37 | + from colab.proxy.utils.plugin import plugin_hotspot | |
| 38 | 38 | from colab.settings import PROXIED_APPS |
| 39 | 39 | |
| 40 | 40 | ... | ... |