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

Merge pull request #1612 from AlanCoding/1564_mongo_tiny_pieces

No mongo connection error in fresh install, no timeout in containers
This commit is contained in:
Alan Rominger 2016-04-20 12:05:35 -04:00
commit 09bc235054
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