Merge pull request #3873 from shanemcd/faster-boots

Avoid DNS timeout in non-Docker for Mac installs

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot]
2019-05-28 14:30:45 +00:00
committed by GitHub
3 changed files with 6 additions and 5 deletions

View File

@@ -169,10 +169,10 @@ CELERYBEAT_SCHEDULE.update({ # noqa
CLUSTER_HOST_ID = socket.gethostname()
try:
socket.gethostbyname('docker.for.mac.host.internal')
if 'Docker for Mac' in os.getenv('OS', ''):
os.environ['SDB_NOTIFY_HOST'] = 'docker.for.mac.host.internal'
except Exception:
else:
os.environ['SDB_NOTIFY_HOST'] = os.popen('ip route').read().split(' ')[2]
WEBSOCKET_ORIGIN_WHITELIST = ['https://localhost:8043', 'https://localhost:3000']