summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/cli/serve/command.go5
-rw-r--r--internal/container/config.go4
-rw-r--r--internal/container/container.go1
3 files changed, 2 insertions, 8 deletions
diff --git a/internal/cli/serve/command.go b/internal/cli/serve/command.go
index 559868d5..7f25551b 100644
--- a/internal/cli/serve/command.go
+++ b/internal/cli/serve/command.go
@@ -98,9 +98,8 @@ func NewCommand(override *[]string, cfgFile *string, silent *bool) *cobra.Comman
case e := <-errCh:
fmt.Printf("error occurred: %v, plugin: %s\n", e.Error, e.VertexID)
- // return error, container already stopped internally
- if !containerCfg.RetryOnFail {
- return errors.E(op, e.Error)
+ if err = endureContainer.Stop(); err != nil {
+ fmt.Printf("error occurred during the stopping container: %v\n", err)
}
case <-stop: // stop the container after first signal
diff --git a/internal/container/config.go b/internal/container/config.go
index 71deafc2..fb5b028e 100644
--- a/internal/container/config.go
+++ b/internal/container/config.go
@@ -11,7 +11,6 @@ import (
type Config struct {
GracePeriod time.Duration
PrintGraph bool
- RetryOnFail bool // TODO check for races, disabled at this moment
LogLevel endure.Level
}
@@ -34,7 +33,6 @@ func NewConfig(cfgFile string) (*Config, error) {
return &Config{ // return config with defaults
GracePeriod: defaultGracePeriod,
PrintGraph: false,
- RetryOnFail: false,
LogLevel: endure.ErrorLevel,
}, nil
}
@@ -42,7 +40,6 @@ func NewConfig(cfgFile string) (*Config, error) {
rrCfgEndure := struct {
GracePeriod time.Duration `mapstructure:"grace_period"`
PrintGraph bool `mapstructure:"print_graph"`
- RetryOnFail bool `mapstructure:"retry_on_fail"`
LogLevel string `mapstructure:"log_level"`
}{}
@@ -67,7 +64,6 @@ func NewConfig(cfgFile string) (*Config, error) {
return &Config{
GracePeriod: rrCfgEndure.GracePeriod,
PrintGraph: rrCfgEndure.PrintGraph,
- RetryOnFail: rrCfgEndure.RetryOnFail,
LogLevel: logLevel,
}, nil
}
diff --git a/internal/container/container.go b/internal/container/container.go
index 25ba6326..610fdbf9 100644
--- a/internal/container/container.go
+++ b/internal/container/container.go
@@ -9,7 +9,6 @@ import (
func NewContainer(cfg Config) (*endure.Endure, error) {
endureOptions := []endure.Options{
endure.SetLogLevel(cfg.LogLevel),
- endure.RetryOnFail(cfg.RetryOnFail),
endure.GracefulShutdownTimeout(cfg.GracePeriod),
}