Skip to content

Commit

Permalink
style: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragjn committed Sep 20, 2021
1 parent 002b5ea commit 3a77640
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions chatbot_ner/asgi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=W1618
"""
ASGI config for chatbot_ner project.
Expand Down
15 changes: 5 additions & 10 deletions chatbot_ner/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,23 +153,18 @@
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'

if 'test' in sys.argv:
class DisableMigrations(object):

def __contains__(self, item):
return True

def __getitem__(self, item):
return None


# FOR TEST CASES - COMMON SETTINGS FOR ALL ENVIRONMENTS
TEST_DB_PATH = os.environ.get('TEST_DB_PATH') or '/dev/shm/chatbot_ner_test.db.sqlite3'
DATABASES['default'] = {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': TEST_DB_PATH,
'CONN_MAX_AGE': 60
}
MIGRATION_MODULES = DisableMigrations()
MIGRATION_MODULES = {
'datastore': None,
'ner_v1': None,
'ner_v2': None,
}
NOSE_ARGS = [
'--nocapture',
'--nologcapture',
Expand Down
4 changes: 3 additions & 1 deletion docker/cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DJANGODIR:$PYTHONPATH

# Initial setup.py - Datastore lines need to be commented for using previously create data
# TODO: Bad design, should not need to comment
# TODO: Bad design, should not need to comment, move this as a separate step outside of dockerfile
# we sleep to make sure elasticsearch is up by the time we start setting up
sleep 10
python /app/datastore_setup.py || { echo 'datastore setup failed'; exit 1; }
/usr/bin/supervisord

0 comments on commit 3a77640

Please sign in to comment.