remove noSleep option

This commit is contained in:
Travis 2020-04-29 15:34:04 -05:00
parent 7b36f417d8
commit 92a94c9ec1
No known key found for this signature in database
GPG key ID: 37080CC2042BA34E
3 changed files with 1 additions and 14 deletions

View file

@ -634,7 +634,7 @@ func (s *Server) monitorResetTranslationSync() {
s.wg.Add(1)
go func() {
// Obtaining this lock ensures that there is only
// once instance of resetTranslationSync() running
// one instance of resetTranslationSync() running
// at once.
s.syncer.mu.Lock()
defer s.syncer.mu.Unlock()

View file

@ -87,7 +87,6 @@ type Command struct {
listenURI *pilosa.URI
tlsConfig *tls.Config
closeTimeout time.Duration
noSleep bool
serverOptions []pilosa.ServerOption
}
@ -115,17 +114,6 @@ func OptCommandConfig(config *Config) CommandOption {
}
}
// OptCommandNoSleep disables the 5 second sleep for non-coordinator
// nodes on startup. See https://github.com/molecula/pilosa/issues/266
// This option should only be used by tests, and expect it to be
// deprecated.
func OptCommandNoSleep() CommandOption {
return func(c *Command) error {
c.noSleep = true
return nil
}
}
// NewCommand returns a new instance of Main.
func NewCommand(stdin io.Reader, stdout, stderr io.Writer, opts ...CommandOption) *Command {
c := &Command{

View file

@ -65,7 +65,6 @@ func newCommand(opts ...server.CommandOption) *Command {
// does not fail on 32-bit systems.
opts = append([]server.CommandOption{
server.OptCommandCloseTimeout(time.Millisecond * 2),
server.OptCommandNoSleep(),
}, opts...)
m := &Command{commandOptions: opts}
m.Command = server.NewCommand(bytes.NewReader(nil), ioutil.Discard, ioutil.Discard, opts...)