This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
5 additions
and
1,997 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
analytics_data_api/management/commands/create_elasticsearch_learners_indices.py
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
analytics_data_api/management/commands/delete_elasticsearch_learners_indices.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,6 @@ | ||
from django.apps import AppConfig | ||
from django.conf import settings | ||
from elasticsearch_dsl import connections | ||
|
||
|
||
class ApiAppConfig(AppConfig): | ||
|
||
name = 'analytics_data_api.v0' | ||
|
||
def ready(self): | ||
from analytics_data_api.utils import load_fully_qualified_definition # pylint: disable=import-outside-toplevel | ||
|
||
super().ready() | ||
if settings.ELASTICSEARCH_LEARNERS_HOST: | ||
connection_params = {'hosts': [settings.ELASTICSEARCH_LEARNERS_HOST]} | ||
if settings.ELASTICSEARCH_CONNECTION_CLASS: | ||
connection_params['connection_class'] = \ | ||
load_fully_qualified_definition(settings.ELASTICSEARCH_CONNECTION_CLASS) | ||
|
||
# aws settings | ||
connection_params['aws_access_key_id'] = settings.ELASTICSEARCH_AWS_ACCESS_KEY_ID | ||
connection_params['aws_secret_access_key'] = settings.ELASTICSEARCH_AWS_SECRET_ACCESS_KEY | ||
connection_params['region'] = settings.ELASTICSEARCH_CONNECTION_DEFAULT_REGION | ||
|
||
# Remove 'None' values so that we don't overwrite defaults | ||
connection_params = {key: val for key, val in connection_params.items() if val is not None} | ||
|
||
connections.connections.create_connection(**connection_params) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.