Revert "[MM-48626] Move plugins environment out of Channels (#21730)" (#21934)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-12-21 22:10:26 +03:00
коммит произвёл GitHub
родитель 45159a6b09
Коммит c252704140
40 изменённых файлов: 447 добавлений и 537 удалений

Просмотреть файл

@@ -119,7 +119,6 @@ type Server struct {
telemetryService *telemetry.TelemetryService
userService *users.UserService
teamService *teams.TeamService
pluginService *PluginService
serviceMux sync.RWMutex
remoteClusterService remotecluster.RemoteClusterServiceIFace
@@ -719,10 +718,6 @@ func (s *Server) Shutdown() {
}
}
// Stop the plugin service, we need to stop plugin service before stopping the
// product as products are being consumed by this service.
s.pluginService.ShutDownPlugins()
// Stop products.
// This needs to happen last because products are dependent
// on parent services.
@@ -829,18 +824,11 @@ func stripPort(hostport string) string {
func (s *Server) Start() error {
// Start products.
// This needs to happen before because products are dependent on the HTTP server.
// make sure channels starts first
if err := s.products["channels"].Start(); err != nil {
return errors.Wrap(err, "Unable to start channels")
}
// This should actually be started after products, but we have a product hooks
// dependency for now, once that get sorted out, this should be moved to the appropriate
// order.
if err := s.InitializePluginService(); err != nil {
return errors.Wrap(err, "Unable to start plugin service")
}
for name, product := range s.products {
if name == "channels" {
continue