deconst / content-service

An API for storing, indexing and retrieving documentation
MIT License
4 stars 9 forks source link

Wait for upstream connections rather than dying immediately #78

Closed smashwilson closed 8 years ago

smashwilson commented 8 years ago

If Elasticsearch or MongoDB are unavailable when the service is first launched, sleep and try again until they are rather than giving up and shutting down.

This'll give us a little more flexibility in service launch timing. Right now it's causing me some hassle because in deconst/integrated#13 because Elasticsearch isn't listening on 9200 right away, so I need to docker-compose up -d twice to get everything to launch properly.

smashwilson commented 8 years ago

Elasticsearch.js makes this difficult :unamused: