1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-20 05:39:42 +02:00

send ready signal after HTTP server init

This commit is contained in:
Harvey Kandola 2017-08-10 11:14:29 +01:00
parent 00c2d17fcb
commit 4b24cbc686
2 changed files with 3 additions and 1 deletions

View file

@ -19,7 +19,6 @@ import (
// AttachStore selects database persistence layer
func AttachStore(r *env.Runtime, s *domain.Store) {
switch r.DbVariant {
case env.DbVariantMySQL, env.DBVariantPercona, env.DBVariantMariaDB:
StoreMySQL(r, s)

View file

@ -85,6 +85,9 @@ func Start(rt *env.Runtime, s *domain.Store, ready chan struct{}) {
n.Use(negroni.HandlerFunc(cm.metrics))
n.UseHandler(router)
// tell caller we are ready to serve HTTP
ready <- struct{}{}
// start server
if !rt.Flags.SSLEnabled() {
rt.Log.Info("Starting non-SSL server on " + rt.Flags.HTTPPort)