Commit 9f08457c by Andy Armstrong Committed by GitHub

Merge pull request #13675 from edx/andy/move-service-status

Move service_status from common into openedx
parents 8ebc4106 a75f64b6
...@@ -809,7 +809,7 @@ INSTALLED_APPS = ( ...@@ -809,7 +809,7 @@ INSTALLED_APPS = (
'config_models', 'config_models',
# Monitor the status of services # Monitor the status of services
'service_status', 'openedx.core.djangoapps.service_status',
# Testing # Testing
'django_nose', 'django_nose',
......
...@@ -148,7 +148,7 @@ if settings.FEATURES.get('ENABLE_EXPORT_GIT'): ...@@ -148,7 +148,7 @@ if settings.FEATURES.get('ENABLE_EXPORT_GIT'):
if settings.FEATURES.get('ENABLE_SERVICE_STATUS'): if settings.FEATURES.get('ENABLE_SERVICE_STATUS'):
urlpatterns += patterns( 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'): if settings.FEATURES.get('AUTH_USE_CAS'):
......
...@@ -1876,7 +1876,7 @@ INSTALLED_APPS = ( ...@@ -1876,7 +1876,7 @@ INSTALLED_APPS = (
'config_models', 'config_models',
# Monitor the status of services # Monitor the status of services
'service_status', 'openedx.core.djangoapps.service_status',
# Display status message to students # Display status message to students
'status', 'status',
......
...@@ -891,7 +891,7 @@ if settings.FEATURES.get('ENABLE_SQL_TRACKING_LOGS'): ...@@ -891,7 +891,7 @@ if settings.FEATURES.get('ENABLE_SQL_TRACKING_LOGS'):
if settings.FEATURES.get('ENABLE_SERVICE_STATUS'): if settings.FEATURES.get('ENABLE_SERVICE_STATUS'):
urlpatterns += ( 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'): if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'):
......
...@@ -7,9 +7,9 @@ from django.conf.urls import patterns, url ...@@ -7,9 +7,9 @@ from django.conf.urls import patterns, url
urlpatterns = patterns( urlpatterns = patterns(
'', '',
url(r'^$', 'service_status.views.index', name='status.service.index'), url(r'^$', 'openedx.core.djangoapps.service_status.views.index', name='status.service.index'),
url(r'^celery/$', 'service_status.views.celery_status', url(r'^celery/$', 'openedx.core.djangoapps.service_status.views.celery_status',
name='status.service.celery.status'), name='status.service.celery.status'),
url(r'^celery/ping/$', 'service_status.views.celery_ping', url(r'^celery/ping/$', 'openedx.core.djangoapps.service_status.views.celery_ping',
name='status.service.celery.ping'), name='status.service.celery.ping'),
) )
...@@ -9,10 +9,11 @@ from django.http import HttpResponse ...@@ -9,10 +9,11 @@ from django.http import HttpResponse
from dogapi import dog_stats_api from dogapi import dog_stats_api
from service_status import tasks
from djcelery import celery from djcelery import celery
from celery.exceptions import TimeoutError from celery.exceptions import TimeoutError
from openedx.core.djangoapps.service_status.tasks import delayed_ping
def index(_): def index(_):
""" """
...@@ -37,7 +38,7 @@ def celery_ping(_): ...@@ -37,7 +38,7 @@ def celery_ping(_):
A Simple view that checks if Celery can process a simple task A Simple view that checks if Celery can process a simple task
""" """
start = time.time() start = time.time()
result = tasks.delayed_ping.apply_async(('ping', 0.1)) result = delayed_ping.apply_async(('ping', 0.1))
task_id = result.id task_id = result.id
# Wait until we get the result # Wait until we get the result
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment