diff --git a/ocw/apps.py b/ocw/apps.py index b826a032..f739f662 100644 --- a/ocw/apps.py +++ b/ocw/apps.py @@ -4,6 +4,8 @@ from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.executors.pool import ThreadPoolExecutor from pytz import utc +import ocw.lib.db + logger = logging.getLogger(__name__) __SCHEDULER = None @@ -36,8 +38,6 @@ def ready(self): getScheduler().start() try: - import ocw.lib.db - ocw.lib.db.init_cron() except Exception: logger.exception("Failure on initialize cronjobs") diff --git a/ocw/lib/emailnotify.py b/ocw/lib/emailnotify.py index c716205f..3f88da47 100644 --- a/ocw/lib/emailnotify.py +++ b/ocw/lib/emailnotify.py @@ -4,6 +4,7 @@ from email.mime.text import MIMEText from texttable import Texttable from django.urls import reverse +from ocw import views from webui.PCWConfig import PCWConfig from webui.settings import build_absolute_uri from ..models import Instance @@ -13,7 +14,6 @@ def draw_instance_table(objects): - from ocw import views table = Texttable(max_width=0) table.set_deco(Texttable.HEADER) table.header(['Provider', 'id', 'Created-By', 'Namespace', 'Age', 'Delete', 'openQA']) diff --git a/pylintrc b/pylintrc index 7c0c7cf0..69616485 100644 --- a/pylintrc +++ b/pylintrc @@ -4,7 +4,6 @@ disable= C0115, # missing-class-docstring C0116, # missing-function-docstring C0206, # Consider iterating with .items() - C0415, # Import outside toplevel E1101, # no-member R1702, # Too many nested blocks W0237, # arguments-renamed