This repository was archived by the owner on May 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +40
-1
lines changed
analyticsdataserver/settings Expand file tree Collapse file tree 7 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 55
66urlpatterns = [
77 url (r'^v0/' , include ('analytics_data_api.v0.urls' )),
8+ url (r'^v1/' , include ('analytics_data_api.v1.urls' )),
89]
910
1011urlpatterns = format_suffix_patterns (urlpatterns )
Original file line number Diff line number Diff line change 1+ from ..v0 .urls import urlpatterns as v0_urlpatterns
2+
3+ app_name = 'v1'
4+
5+ urlpatterns = v0_urlpatterns .copy ()
Original file line number Diff line number Diff line change 6060 'USER' : 'api001' ,
6161 'ATOMIC_REQUESTS' : False ,
6262 },
63+ 'reports_v1' : {
64+ 'ENGINE' : 'django.db.backends.mysql' ,
65+ 'HOST' : 'localhost' ,
66+ 'NAME' : 'reports_v1' ,
67+ 'OPTIONS' : DEFAULT_MYSQL_OPTIONS ,
68+ 'PASSWORD' : 'password' ,
69+ 'PORT' : '3306' ,
70+ 'USER' : 'reports001' ,
71+ },
6372 'reports' : {
6473 'ENGINE' : 'django.db.backends.mysql' ,
6574 'HOST' : 'localhost' ,
370379
371380########## ANALYTICS DATA API CONFIGURATION
372381
373- ANALYTICS_DATABASE = 'default'
382+ ANALYTICS_DATABASE = 'reports'
383+ # Currently unused, V1 database will support migration to new backend data source
384+ ANALYTICS_DATABASE_V1 = 'reports_v1'
374385DATABASE_ROUTERS = ['analyticsdataserver.router.AnalyticsApiRouter' ]
375386ENTERPRISE_REPORTING_DB_ALIAS = 'enterprise'
376387
Original file line number Diff line number Diff line change 1414 'HOST' : 'edx.devstack.mysql' ,
1515 'PORT' : '3306' ,
1616 },
17+ 'analytics_v1' : {
18+ 'ENGINE' : 'django.db.backends.mysql' ,
19+ 'NAME' : 'reports_v1' ,
20+ 'USER' : 'api001' ,
21+ 'PASSWORD' : 'password' ,
22+ 'HOST' : 'edx.devstack.mysql' ,
23+ 'PORT' : '3306' ,
24+ },
1725 'analytics' : {
1826 'ENGINE' : 'django.db.backends.mysql' ,
1927 'NAME' : 'reports' ,
3442for override , value in DB_OVERRIDES .items ():
3543 DATABASES ['default' ][override ] = value
3644 DATABASES ['analytics' ][override ] = value
45+ DATABASES ['analytics_v1' ][override ] = value
3746########## END DATABASE CONFIGURATION
3847
3948ELASTICSEARCH_LEARNERS_HOST = os .environ .get ('ELASTICSEARCH_LEARNERS_HOST' , 'edx.devstack.elasticsearch' )
Original file line number Diff line number Diff line change 4040 'HOST' : '' ,
4141 'PORT' : '' ,
4242 },
43+ 'analytics_v1' : {
44+ 'ENGINE' : 'django.db.backends.sqlite3' ,
45+ 'NAME' : normpath (join (DJANGO_ROOT , 'analytics.db' )),
46+ 'USER' : '' ,
47+ 'PASSWORD' : '' ,
48+ 'HOST' : '' ,
49+ 'PORT' : '' ,
50+ },
4351 'enterprise' : {
4452 'ENGINE' : 'django.db.backends.sqlite3' ,
4553 'NAME' : normpath (join (DJANGO_ROOT , 'enterprise_reporting.db' )),
6674
6775ANALYTICS_DATABASE = 'analytics'
6876ENTERPRISE_REPORTING_DB_ALIAS = 'analytics'
77+ ANALYTICS_DATABASE_V1 = 'analytics'
6978
7079TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
7180
Original file line number Diff line number Diff line change 1616 },
1717}
1818
19+ ANALYTICS_DATABASE = 'default'
20+ ENTERPRISE_REPORTING_DB_ALIAS = 'default'
21+ ANALYTICS_DATABASE_V1 = 'default'
22+
1923# Silence elasticsearch during tests
2024LOGGING ['loggers' ]['elasticsearch' ]['handlers' ] = ['null' ]
2125
You can’t perform that action at this time.
0 commit comments