summaryrefslogtreecommitdiff
path: root/server_config.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-10 13:22:54 +0300
committerWolfy-J <[email protected]>2018-06-10 13:22:54 +0300
commit16a347283b52f5cf997f9994cba79bba86a428c3 (patch)
treeb892553f92d984595da4b5c08ced1572afba11c9 /server_config.go
parentdc56d924ac34252f1866dd067a9e80c30b0d133c (diff)
fixing tests
Diffstat (limited to 'server_config.go')
-rw-r--r--server_config.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/server_config.go b/server_config.go
index d7c27c4a..4a03f44d 100644
--- a/server_config.go
+++ b/server_config.go
@@ -10,8 +10,7 @@ import (
// Server config combines factory, pool and cmd configurations.
type ServerConfig struct {
- // Command includes command strings with all the parameters, example: "php worker.php pipes". This config section
- // must not change on re-configuration.
+ // Command includes command strings with all the parameters, example: "php worker.php pipes".
Command string
// Relay defines connection method and factory to be used to connect to workers:
@@ -28,17 +27,17 @@ type ServerConfig struct {
Pool Config
}
-// Differs returns true if configuration has changed but ignores pool changes.
+// Differs returns true if configuration has changed but ignores pool or cmd changes.
func (cfg *ServerConfig) Differs(new *ServerConfig) bool {
- return cfg.Command != new.Command || cfg.Relay != new.Relay || cfg.RelayTimeout != new.RelayTimeout
+ return cfg.Relay != new.Relay || cfg.RelayTimeout != new.RelayTimeout
}
// makeCommands returns new command provider based on configured options.
-func (cfg *ServerConfig) makeCommand() (func() *exec.Cmd, error) {
+func (cfg *ServerConfig) makeCommand() func() *exec.Cmd {
var cmd = strings.Split(cfg.Command, " ")
return func() *exec.Cmd {
return exec.Command(cmd[0], cmd[1:]...)
- }, nil
+ }
}
// makeFactory creates and connects new factory instance based on given parameters.