diff options
author | Valery Piashchynski <[email protected]> | 2020-03-08 16:36:21 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-03-08 16:36:21 +0300 |
commit | ec846d99cc218a2c99c2358920ab4595b4b5ea7c (patch) | |
tree | f0dfe0fd3c0881127914ac14fff71f5e0ea33d3f | |
parent | bcaa85eba41c0c723c6330f7cdb52cab11b049d7 (diff) |
Add BORS to repo
Remove signal handling in Serve for dev
-rw-r--r-- | bors.toml | 15 | ||||
-rw-r--r-- | go.mod | 1 | ||||
-rw-r--r-- | service/container.go | 8 |
3 files changed, 16 insertions, 8 deletions
diff --git a/bors.toml b/bors.toml new file mode 100644 index 00000000..770677e3 --- /dev/null +++ b/bors.toml @@ -0,0 +1,15 @@ +status = [ +'CI / Build (PHP 7.1, Go 1.13, OS ubuntu-latest)', +'CI / Build (PHP 7.1, Go 1.14, OS ubuntu-latest)', +'CI / Build (PHP 7.2, Go 1.13, OS ubuntu-latest)', +'CI / Build (PHP 7.2, Go 1.14, OS ubuntu-latest)', +'CI / Build (PHP 7.3, Go 1.13, OS ubuntu-latest)', +'CI / Build (PHP 7.3, Go 1.14, OS ubuntu-latest)', +'CI / Build (PHP 7.4, Go 1.13, OS ubuntu-latest)', +'CI / Build (PHP 7.4, Go 1.14, OS ubuntu-latest)', +'CI / runner / golangci-lint', +'CI / Build docker image'] + +required_approvals = 1 +delete_merged_branches = true +timeout-sec = 1800
\ No newline at end of file @@ -16,6 +16,7 @@ require ( github.com/spf13/cobra v0.0.6 github.com/spf13/viper v1.6.2 github.com/spiral/goridge v2.1.4+incompatible + github.com/spiral/jobs/v2 v2.1.2 github.com/stretchr/testify v1.5.1 github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a github.com/yookoala/gofast v0.4.0 diff --git a/service/container.go b/service/container.go index c83ce64b..18d3ec3b 100644 --- a/service/container.go +++ b/service/container.go @@ -4,11 +4,8 @@ import ( "fmt" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "os" - "os/signal" "reflect" "sync" - "syscall" ) var errNoConfig = fmt.Errorf("no config has been provided") @@ -169,9 +166,6 @@ func (c *container) Init(cfg Config) error { // Serve all configured services. Non blocking. func (c *container) Serve() error { - cc := make(chan os.Signal, 1) - signal.Notify(cc, os.Interrupt, syscall.SIGTERM, syscall.SIGINT) - for _, e := range c.services { if e.hasStatus(StatusOK) && e.canServe() { c.log.Debugf("[%s]: started", e.name) @@ -195,8 +189,6 @@ func (c *container) Serve() error { for { select { - case <-cc: - return nil case fail := <-c.errc: if fail.err == errTempFix223 { return nil |