1
0
Fork 0

Linting for R0401

Fixes a cyclical dependency between calling the celery app through an import in tasks.py (which then imports tasks.py) by retrieving celery through the class.

Tested in local dev

Signed-off-by: Corey Shields <cshields@gmail.com>
merge-requests/402/head
Corey Shields 2019-07-27 14:17:16 -04:00
parent b0bfe0eea7
commit f9336eb0b4
2 changed files with 2 additions and 2 deletions

View File

@ -7,6 +7,5 @@ ignored-argument-names=args|kwargs
disable=
C0412,
E1101,
R0401,
R0801, # needs to remain disabled see https://github.com/PyCQA/pylint/issues/214
W0511,

View File

@ -6,6 +6,7 @@ import csv
import logging
from datetime import datetime, timedelta
from celery import Celery
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.mail import send_mail
@ -17,10 +18,10 @@ from sgp4.io import twoline2rv
from db.base.models import DemodData, Satellite
from db.base.utils import cache_statistics, decode_data
from db.celery import APP
LOGGER = logging.getLogger('db')
APP = Celery('db')
@APP.task(task_ignore_result=False)
def check_celery():