From 68d0526c1fb04a4424ef7c91a86e5dffd8dfa9ba Mon Sep 17 00:00:00 2001 From: Maxim Kulkin Date: Thu, 17 Oct 2013 16:40:18 +0400 Subject: [PATCH] Fixed bug introduced after autopep8; added autoimport of all inspections in Celery worker --- ostack_validator/celery.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ostack_validator/celery.py b/ostack_validator/celery.py index 5bc9ec7..f56cbc5 100644 --- a/ostack_validator/celery.py +++ b/ostack_validator/celery.py @@ -1,14 +1,15 @@ from __future__ import absolute_import import os -import time import logging import traceback from celery import Celery -from ostack_validator.common import Issue, MarkedIssue, Inspection -from ostack_validator.discovery import OpenstackDiscovery, OpenstackComponent -from ostack_validator.inspections import KeystoneAuthtokenSettingsInspection +from ostack_validator.common import Issue, Inspection +from ostack_validator.discovery import OpenstackDiscovery +import ostack_validator.inspections +# Silence PEP8 "unused import" +assert ostack_validator.inspections broker_url = os.getenv('CELERY_BROKER_URL', 'redis://localhost:6379/0') backend_url = os.getenv('CELERY_RESULT_BACKEND', broker_url) @@ -49,9 +50,9 @@ def ostack_inspect_task(request): except: message = traceback.format_exc() logger.error(message) - return InspectionResult(request, message) + return InspectionResult(request, message) - all_inspections = [KeystoneAuthtokenSettingsInspection] + all_inspections = Inspection.all_inspections() for inspection in all_inspections: try: x = inspection()