diff options
author | Wolfy-J <[email protected]> | 2018-09-21 16:22:26 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-09-21 16:22:26 +0300 |
commit | a6191395dbf15b5884999382a0fc6ca894367323 (patch) | |
tree | 2a110d84d061b4ff8aa06a57cc2b8e0d00120e7c /service | |
parent | f44a1368c9da1dda098dad25ac9dcc4db40f24c1 (diff) |
- added RR_HTTP env variable to php processes run under http service
- bugfix: ignored `--config` option
- added shorthand for config `-c`
- rr now changes working dir to the config location (allows relating paths for php scripts)
Diffstat (limited to 'service')
-rw-r--r-- | service/http/service.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/service/http/service.go b/service/http/service.go index f988a843..ecce1c15 100644 --- a/service/http/service.go +++ b/service/http/service.go @@ -11,8 +11,13 @@ import ( "sync/atomic" ) -// ID contains default svc name. -const ID = "http" +const ( + // ID contains default svc name. + ID = "http" + + // httpKey indicates to php process that it's running under http service + httpKey = "rr_http" +) // http middleware type. type middleware func(f http.HandlerFunc) http.HandlerFunc @@ -69,6 +74,8 @@ func (s *Service) Serve() error { for k, v := range values { s.cfg.Workers.SetEnv(k, v) } + + s.cfg.Workers.SetEnv(httpKey, "true") } rr := roadrunner.NewServer(s.cfg.Workers) |