diff options
author | Valery Piashchynski <[email protected]> | 2020-12-24 10:39:05 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-24 10:39:05 +0300 |
commit | 62ee1770cc233328300438ffd690ea1d8fc747bb (patch) | |
tree | adc7d78e28a9512cb1b1ba85cb4f19dec7d1323d | |
parent | e78c13d93a729a9008f283aa3db6910f3e833165 (diff) |
Remove local replace in the go.mod
-rwxr-xr-x | .rr.yaml | 6 | ||||
-rw-r--r-- | cmd/cli/workers.go | 9 | ||||
-rw-r--r-- | cmd/main.go | 4 | ||||
-rwxr-xr-x | cmd/rr | bin | 25579539 -> 0 bytes | |||
-rwxr-xr-x | go.mod | 7 | ||||
-rwxr-xr-x | go.sum | 2 |
6 files changed, 19 insertions, 9 deletions
@@ -13,18 +13,18 @@ server: logs: mode: development - level: debug + level: error http: debug: true - address: 127.0.0.1:18903 + address: 127.0.0.1:44933 maxRequestSize: 1024 middleware: [ "gzip", "headers" ] uploads: forbid: [ ".php", ".exe", ".bat" ] trustedSubnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ] pool: - numWorkers: 3 + numWorkers: 6 maxJobs: 0 allocateTimeout: 60s destroyTimeout: 60s diff --git a/cmd/cli/workers.go b/cmd/cli/workers.go index 4bcbbdbd..d34de40a 100644 --- a/cmd/cli/workers.go +++ b/cmd/cli/workers.go @@ -5,6 +5,8 @@ import ( "log" "net/rpc" "os" + "os/signal" + "syscall" "time" tm "github.com/buger/goterm" @@ -68,11 +70,18 @@ func workersHandler(cmd *cobra.Command, args []string) error { return showWorkers(plugins, client) } + // https://golang.org/pkg/os/signal/#Notify + // should be of buffer size at least 1 + c := make(chan os.Signal, 1) + signal.Notify(c, os.Interrupt, syscall.SIGTERM, syscall.SIGINT) + tm.Clear() tt := time.NewTicker(time.Second) defer tt.Stop() for { select { + case <-c: + return nil case <-tt.C: tm.MoveCursor(1, 1) err := showWorkers(plugins, client) diff --git a/cmd/main.go b/cmd/main.go index ac98c5a8..8151d4fe 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -18,9 +18,9 @@ import ( func main() { var err error - cli.Container, err = endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel), endure.RetryOnFail(false)) + cli.Container, err = endure.NewContainer(nil, endure.SetLogLevel(endure.ErrorLevel), endure.RetryOnFail(false)) if err != nil { - return + log.Fatal(err) } err = cli.Container.RegisterAll( diff --git a/cmd/rr b/cmd/rr Binary files differdeleted file mode 100755 index b6fd15f4..00000000 --- a/cmd/rr +++ /dev/null @@ -23,16 +23,15 @@ require ( github.com/spiral/roadrunner-plugins/reload v1.0.1 github.com/spiral/roadrunner-plugins/resetter v1.0.0 github.com/spiral/roadrunner-plugins/rpc v1.0.1 - github.com/spiral/roadrunner-plugins/server v1.0.3 + github.com/spiral/roadrunner-plugins/server v1.0.4 github.com/stretchr/testify v1.6.1 github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a github.com/vbauerster/mpb/v5 v5.4.0 go.uber.org/multierr v1.6.0 - go.uber.org/zap v1.16.0 golang.org/x/sync v0.0.0-20201207232520-09787c993a3a ) -replace github.com/spiral/roadrunner-plugins/http v1.0.2 => ../roadrunner-plugins/http +//replace github.com/spiral/roadrunner-plugins/http v1.0.2 => ../roadrunner-plugins/http //replace github.com/spiral/roadrunner-plugins/reload v1.0.0 => ../roadrunner-plugins/reload //replace github.com/spiral/roadrunner-plugins/rpc v1.0.0 => ../roadrunner-plugins/rpc -replace github.com/spiral/roadrunner-plugins/server v1.0.3 => ../roadrunner-plugins/server +//replace github.com/spiral/roadrunner-plugins/server v1.0.3 => ../roadrunner-plugins/server @@ -447,6 +447,8 @@ github.com/spiral/roadrunner-plugins/server v1.0.1 h1:yzCw5rgz+KHpJb56QIID3gWH/I github.com/spiral/roadrunner-plugins/server v1.0.1/go.mod h1:qedfnQFlK1+Jwv5M8mRXJCOWTvF/qfFyULK/0UMBeOk= github.com/spiral/roadrunner-plugins/server v1.0.3 h1:Bhr5tK0eW+52/qeew6QMowowOpeUKJv/qqECCmW1X+Y= github.com/spiral/roadrunner-plugins/server v1.0.3/go.mod h1:XHfOZwvITuKyUwU79KaeMm8gU5AqzKQg0MCHJ7eBU5c= +github.com/spiral/roadrunner-plugins/server v1.0.4 h1:i6QWbVM/gLnM3Tb/DDFSFpRnxccJd3mCpENW2rBuTeE= +github.com/spiral/roadrunner-plugins/server v1.0.4/go.mod h1:XHfOZwvITuKyUwU79KaeMm8gU5AqzKQg0MCHJ7eBU5c= github.com/spiral/roadrunner/v2 v2.0.0-alpha26/go.mod h1:r7ojuHm9qCVbg4fKcqr4Aqk7VXqZ9YPefr1LOv7HNys= github.com/spiral/roadrunner/v2 v2.0.0-alpha28/go.mod h1:Uqtk/47S+qweVjSl4R9XVImEVZc3nMWku4yg3A+f18Q= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= |