feat(edge): update lib
This commit is contained in:
@ -209,11 +209,13 @@ func (c *Controller) updateApp(ctx context.Context, specs *spec.Spec, appKey str
|
||||
return nil
|
||||
}
|
||||
|
||||
ctx = logger.With(ctx,
|
||||
logger.F("appKey", appKey),
|
||||
logger.F("address", appEntry.Address),
|
||||
)
|
||||
|
||||
if defChanged && server.AppDefHash != 0 {
|
||||
logger.Info(
|
||||
ctx, "restarting app",
|
||||
logger.F("address", appEntry.Address),
|
||||
)
|
||||
logger.Info(ctx, "restarting app")
|
||||
|
||||
if err := server.Server.Stop(); err != nil {
|
||||
return errors.WithStack(err)
|
||||
@ -226,10 +228,7 @@ func (c *Controller) updateApp(ctx context.Context, specs *spec.Spec, appKey str
|
||||
|
||||
c.servers[appKey] = serverEntry
|
||||
} else {
|
||||
logger.Info(
|
||||
ctx, "starting app",
|
||||
logger.F("address", appEntry.Address),
|
||||
)
|
||||
logger.Info(ctx, "starting app")
|
||||
}
|
||||
|
||||
if err := server.Server.Start(ctx, appEntry.Address); err != nil {
|
||||
|
@ -49,7 +49,7 @@ func (s *Server) Start(ctx context.Context, addr string) (err error) {
|
||||
router.Use(middleware.Compress(5))
|
||||
|
||||
handler := edgeHTTP.NewHandler(s.handlerOptions...)
|
||||
if err := handler.Load(s.bundle); err != nil {
|
||||
if err := handler.Load(ctx, s.bundle); err != nil {
|
||||
return errors.Wrap(err, "could not load app bundle")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user