mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 06:56:00 -03:30
remove connection error in fresh install, mongo setting in dev environment
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user