summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go.mod6
-rw-r--r--go.sum11
-rw-r--r--internal/cli/serve/command.go5
-rw-r--r--internal/container/config.go4
-rw-r--r--internal/container/container.go1
5 files changed, 11 insertions, 16 deletions
diff --git a/go.mod b/go.mod
index 8b62db6d..319604b4 100644
--- a/go.mod
+++ b/go.mod
@@ -15,7 +15,7 @@ require (
github.com/roadrunner-server/broadcast/v2 v2.12.1
github.com/roadrunner-server/cache/v2 v2.13.1
github.com/roadrunner-server/config/v2 v2.13.3
- github.com/roadrunner-server/endure v1.2.3
+ github.com/roadrunner-server/endure v1.3.0
github.com/roadrunner-server/errors v1.1.2
github.com/roadrunner-server/fileserver/v2 v2.12.3
github.com/roadrunner-server/goridge/v3 v3.4.1
@@ -41,7 +41,7 @@ require (
github.com/roadrunner-server/rpc/v2 v2.12.3
github.com/roadrunner-server/send/v2 v2.11.1
github.com/roadrunner-server/server/v2 v2.13.3
- github.com/roadrunner-server/service/v2 v2.14.4
+ github.com/roadrunner-server/service/v2 v2.14.5
github.com/roadrunner-server/sqs/v2 v2.14.1
github.com/roadrunner-server/static/v2 v2.12.3
github.com/roadrunner-server/status/v2 v2.12.1
@@ -183,5 +183,5 @@ require (
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
- gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
+ gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99 // indirect
)
diff --git a/go.sum b/go.sum
index 4731f44b..55869d3e 100644
--- a/go.sum
+++ b/go.sum
@@ -434,8 +434,8 @@ github.com/roadrunner-server/cache/v2 v2.13.1 h1:txIVPyGGRBYohX2DJLeDc+OPD0CZaB7
github.com/roadrunner-server/cache/v2 v2.13.1/go.mod h1:www4zHmtv404XV46R9oNULxtRSlX24FyOMH9mtuBqXc=
github.com/roadrunner-server/config/v2 v2.13.3 h1:I3SDBhmJ42BKaKykITfmxLOmZj2DmOxXBZIMqobLCoM=
github.com/roadrunner-server/config/v2 v2.13.3/go.mod h1:JlRI3FkyieFv5pBkv7YFOZqUFm8XqZ8kQd26ySDbvfE=
-github.com/roadrunner-server/endure v1.2.3 h1:Smm+pHDERzeqXsLO602oe5iy0q+w94jAH3UT1pqgZiY=
-github.com/roadrunner-server/endure v1.2.3/go.mod h1:Yahi4Uoabla2o+0N+pbjWwIJnAigYWppGwbLU3D6cLc=
+github.com/roadrunner-server/endure v1.3.0 h1:lZNOE4EDcoibR2PE4xz6G8/ywQBq9HmMzCvfQenEUCA=
+github.com/roadrunner-server/endure v1.3.0/go.mod h1:Yahi4Uoabla2o+0N+pbjWwIJnAigYWppGwbLU3D6cLc=
github.com/roadrunner-server/errors v1.1.2 h1:+LPw9Akgg+8LAGM4wASMWLAoBIbyP+mhNfR+FBS2Slw=
github.com/roadrunner-server/errors v1.1.2/go.mod h1:jVSh32nFtRMzKItYUM9W2CTLLpXAM8HseL2lUENPYtU=
github.com/roadrunner-server/fileserver/v2 v2.12.3 h1:7kA1OX43D/4yrGs13vA+hSqr+qA1XUGsY1FXgnRlsZY=
@@ -488,8 +488,8 @@ github.com/roadrunner-server/send/v2 v2.11.1 h1:qTItHaFCMdEkpUmJb2GnyK/FeNIWT2LQ
github.com/roadrunner-server/send/v2 v2.11.1/go.mod h1:RiSEAcSFjClpr8XSxtqLjCu+TND2P3LUfxd1tRpOAGk=
github.com/roadrunner-server/server/v2 v2.13.3 h1:QRMHuMzj8D5/pHNKF0jLYSwCT1kOU1n+iltEpYq4eMo=
github.com/roadrunner-server/server/v2 v2.13.3/go.mod h1:P4XUv9jFcl4C2pf94SWZU5sy3f2/OrS+0UNUx1df4Ao=
-github.com/roadrunner-server/service/v2 v2.14.4 h1:R+GnuCvJNyq6I/Vjzvp2Yj/Cc5kPopjRvebT37mRZ8o=
-github.com/roadrunner-server/service/v2 v2.14.4/go.mod h1:nsqNUAEiT3rbcn467cCeQ45WNTk17iW52vwM2dFj1js=
+github.com/roadrunner-server/service/v2 v2.14.5 h1:xULe+Al1X0E6pCW5qRDSJM9YT2b/DCoyASYmXoveZs8=
+github.com/roadrunner-server/service/v2 v2.14.5/go.mod h1:nsqNUAEiT3rbcn467cCeQ45WNTk17iW52vwM2dFj1js=
github.com/roadrunner-server/sqs/v2 v2.14.1 h1:qCNeGDeHFt/QkL7OSJB1d950klg47ymaP4fmD2EhR6g=
github.com/roadrunner-server/sqs/v2 v2.14.1/go.mod h1:Onu3t/VT0E2mCAyph3nsMBfwHMSk3BIPwbX78vP3BEI=
github.com/roadrunner-server/static/v2 v2.12.3 h1:RV9L9L0jzMfbXR1ttQ2RGJTHIZMo20HUrxsHBZO1xVo=
@@ -1044,8 +1044,9 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99 h1:dbuHpmKjkDzSOMKAWl10QNlgaZUd3V1q99xc81tt2Kc=
+gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
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),
}