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
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") Fact = apps.get_model('main', "Fact")
Host = apps.get_model('main', "Host") 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: try:
n = FactVersion.objects.all().count() n = FactVersion.objects.all().count()
except ConnectionError: except ConnectionError:

View File

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