From dd224cf8616d2196150fb7a64397eb1a9567e11b Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 25 Nov 2020 23:11:35 +0300 Subject: Finish tests for the http plugin --- plugins/http/plugin.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'plugins/http/plugin.go') diff --git a/plugins/http/plugin.go b/plugins/http/plugin.go index 78179242..7ce3a70d 100644 --- a/plugins/http/plugin.go +++ b/plugins/http/plugin.go @@ -92,10 +92,6 @@ func (s *Plugin) Init(cfg config.Configurer, log log.Logger, server factory.Serv return errors.E(op, errors.Disabled) } - // Set needed env vars - env := make(map[string]string) - env["RR_HTTP"] = "true" - s.pool, err = server.NewWorkerPool(context.Background(), roadrunner.PoolConfig{ Debug: s.cfg.Pool.Debug, NumWorkers: s.cfg.Pool.NumWorkers, @@ -103,7 +99,7 @@ func (s *Plugin) Init(cfg config.Configurer, log log.Logger, server factory.Serv AllocateTimeout: s.cfg.Pool.AllocateTimeout, DestroyTimeout: s.cfg.Pool.DestroyTimeout, Supervisor: s.cfg.Pool.Supervisor, - }, env) + }, s.cfg.Env) if err != nil { return errors.E(op, err) } @@ -297,13 +293,8 @@ func (s *Plugin) Reset() error { s.log.Info("Resetting http plugin") s.pool.Destroy(context.Background()) - // Set needed env vars - env := make(map[string]string) - env["RR_HTTP"] = "true" - var err error - // re-read the config - err = s.configurer.UnmarshalKey(ServiceName, &s.cfg) + err := s.configurer.UnmarshalKey(ServiceName, &s.cfg) if err != nil { return errors.E(op, err) } @@ -315,7 +306,7 @@ func (s *Plugin) Reset() error { AllocateTimeout: s.cfg.Pool.AllocateTimeout, DestroyTimeout: s.cfg.Pool.DestroyTimeout, Supervisor: s.cfg.Pool.Supervisor, - }, env) + }, s.cfg.Env) if err != nil { return errors.E(op, err) } -- cgit v1.2.3