1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

remove connection error in fresh install, mongo setting in dev environment

This commit is contained in:
AlanCoding 2016-04-20 10:15:06 -04:00
parent 6c7382b7b9
commit ca682fb362
2 changed files with 5 additions and 1 deletions

View File

@ -20,6 +20,10 @@ def migrate_facts(apps, schema_editor):
Fact = apps.get_model('main', "Fact")
Host = apps.get_model('main', "Host")
if (not hasattr(settings, 'MONGO_HOST')) or settings.MONGO_HOST == NotImplemented:
# If settings do not specify a mongo database, do not raise error or drop db
return (0, 0)
try:
n = FactVersion.objects.all().count()
except ConnectionError:

View File

@ -51,7 +51,7 @@ if is_testing(sys.argv):
BROKER_URL = 'redis://redis/'
# Mongo host configuration
MONGO_HOST = 'mongo'
MONGO_HOST = NotImplemented
# Set True to enable additional logging from the job_event_callback plugin
JOB_CALLBACK_DEBUG = False