diff --git a/cms/envs/common.py b/cms/envs/common.py index a757dbd4f1..33c9895fc4 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -809,7 +809,7 @@ INSTALLED_APPS = ( 'config_models', # Monitor the status of services - 'service_status', + 'openedx.core.djangoapps.service_status', # Testing 'django_nose', diff --git a/cms/urls.py b/cms/urls.py index d4e2c08dfa..9df1125bc6 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -148,7 +148,7 @@ if settings.FEATURES.get('ENABLE_EXPORT_GIT'): if settings.FEATURES.get('ENABLE_SERVICE_STATUS'): urlpatterns += patterns( '', - url(r'^status/', include('service_status.urls')), + url(r'^status/', include('openedx.core.djangoapps.service_status.urls')), ) if settings.FEATURES.get('AUTH_USE_CAS'): diff --git a/common/djangoapps/service_status/urls.py b/common/djangoapps/service_status/urls.py deleted file mode 100644 index c5ee44b8b6..0000000000 --- a/common/djangoapps/service_status/urls.py +++ /dev/null @@ -1,15 +0,0 @@ -""" -Django URLs for service status app -""" - -from django.conf.urls import patterns, url - - -urlpatterns = patterns( - '', - url(r'^$', 'service_status.views.index', name='status.service.index'), - url(r'^celery/$', 'service_status.views.celery_status', - name='status.service.celery.status'), - url(r'^celery/ping/$', 'service_status.views.celery_ping', - name='status.service.celery.ping'), -) diff --git a/lms/envs/common.py b/lms/envs/common.py index 52f3deb5f4..2db516a970 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1876,7 +1876,7 @@ INSTALLED_APPS = ( 'config_models', # Monitor the status of services - 'service_status', + 'openedx.core.djangoapps.service_status', # Display status message to students 'status', diff --git a/lms/urls.py b/lms/urls.py index 4c0392476d..9691bc77fc 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -891,7 +891,7 @@ if settings.FEATURES.get('ENABLE_SQL_TRACKING_LOGS'): if settings.FEATURES.get('ENABLE_SERVICE_STATUS'): urlpatterns += ( - url(r'^status/', include('service_status.urls')), + url(r'^status/', include('openedx.core.djangoapps.service_status.urls')), ) if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'): diff --git a/common/djangoapps/service_status/__init__.py b/openedx/core/djangoapps/service_status/__init__.py similarity index 100% rename from common/djangoapps/service_status/__init__.py rename to openedx/core/djangoapps/service_status/__init__.py diff --git a/common/djangoapps/service_status/tasks.py b/openedx/core/djangoapps/service_status/tasks.py similarity index 100% rename from common/djangoapps/service_status/tasks.py rename to openedx/core/djangoapps/service_status/tasks.py diff --git a/common/djangoapps/service_status/test.py b/openedx/core/djangoapps/service_status/test.py similarity index 100% rename from common/djangoapps/service_status/test.py rename to openedx/core/djangoapps/service_status/test.py diff --git a/openedx/core/djangoapps/service_status/urls.py b/openedx/core/djangoapps/service_status/urls.py new file mode 100644 index 0000000000..a5c388f582 --- /dev/null +++ b/openedx/core/djangoapps/service_status/urls.py @@ -0,0 +1,15 @@ +""" +Django URLs for service status app +""" + +from django.conf.urls import patterns, url + + +urlpatterns = patterns( + '', + url(r'^$', 'openedx.core.djangoapps.service_status.views.index', name='status.service.index'), + url(r'^celery/$', 'openedx.core.djangoapps.service_status.views.celery_status', + name='status.service.celery.status'), + url(r'^celery/ping/$', 'openedx.core.djangoapps.service_status.views.celery_ping', + name='status.service.celery.ping'), +) diff --git a/common/djangoapps/service_status/views.py b/openedx/core/djangoapps/service_status/views.py similarity index 90% rename from common/djangoapps/service_status/views.py rename to openedx/core/djangoapps/service_status/views.py index 22028d545f..e0db84010b 100644 --- a/common/djangoapps/service_status/views.py +++ b/openedx/core/djangoapps/service_status/views.py @@ -9,10 +9,11 @@ from django.http import HttpResponse from dogapi import dog_stats_api -from service_status import tasks from djcelery import celery from celery.exceptions import TimeoutError +from openedx.core.djangoapps.service_status.tasks import delayed_ping + def index(_): """ @@ -37,7 +38,7 @@ def celery_ping(_): A Simple view that checks if Celery can process a simple task """ start = time.time() - result = tasks.delayed_ping.apply_async(('ping', 0.1)) + result = delayed_ping.apply_async(('ping', 0.1)) task_id = result.id # Wait until we get the result