Use AppConfig in instuctor_task app to ensure tasks are discovered

This fixes an issue where instructor_task Celery tasks were not being
auto-discovered, thus leaving them unregistered and unable to be
completed by our Celery workers.

TNL-7652
This commit is contained in:
Kyle McCormick
2020-10-26 15:13:22 -04:00
parent 48b4dfb201
commit 762b4fdf7f
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
# pylint: disable=missing-module-docstring
default_app_config = 'lms.djangoapps.instructor_task.apps.InstructorTaskConfig'

View File

@@ -0,0 +1,16 @@
"""
Instructor Task Application Configuration
"""
from django.apps import AppConfig
class InstructorTaskConfig(AppConfig):
"""
Application Configuration for Instructor Task
"""
name = u'lms.djangoapps.instructor_task'
def ready(self):
# noinspection PyUnresolvedReferences
from . import tasks # pylint: disable=unused-import