Improve extensions build. (#12461)
* enable ee build on pr/master * step1: of including group sync * disable commit pinning for now * fixes broken build * enable team to ldap group sync * avoid returning error for missing external handler * services: allow routes to be added before http server start * services: allows services to add their own migrations * moves db migrations to ee code base * build using master branch in ee * disable enterprise build in .bra.toml [skip ci] * removes team sync extensions * removes commented line
This commit is contained in:
committed by
Torkel Ödegaard
parent
1601f6d17c
commit
861af4cb97
+10
-5
@@ -33,7 +33,11 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterService(&HTTPServer{})
|
||||
registry.Register(®istry.Descriptor{
|
||||
Name: "HTTPServer",
|
||||
Instance: &HTTPServer{},
|
||||
InitPriority: registry.High,
|
||||
})
|
||||
}
|
||||
|
||||
type HTTPServer struct {
|
||||
@@ -54,6 +58,10 @@ func (hs *HTTPServer) Init() error {
|
||||
hs.log = log.New("http.server")
|
||||
hs.cache = gocache.New(5*time.Minute, 10*time.Minute)
|
||||
|
||||
hs.streamManager = live.NewStreamManager()
|
||||
hs.macaron = hs.newMacaron()
|
||||
hs.registerRoutes()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -61,10 +69,7 @@ func (hs *HTTPServer) Run(ctx context.Context) error {
|
||||
var err error
|
||||
|
||||
hs.context = ctx
|
||||
hs.streamManager = live.NewStreamManager()
|
||||
hs.macaron = hs.newMacaron()
|
||||
hs.registerRoutes()
|
||||
|
||||
hs.applyRoutes()
|
||||
hs.streamManager.Run(ctx)
|
||||
|
||||
listenAddr := fmt.Sprintf("%s:%s", setting.HttpAddr, setting.HttpPort)
|
||||
|
||||
Reference in New Issue
Block a user