diff options
author | Valery Piashchynski <[email protected]> | 2020-03-06 01:16:25 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-03-06 01:16:25 +0300 |
commit | 617eb5a965fd70c150754bc661c4d19eb3a8d184 (patch) | |
tree | 89619d4c41b554cfa402e8b4b9c69a127d294c90 /cmd | |
parent | a208e27c9d8f4558328c3931c960f155a02e786f (diff) |
Add container with [ephemeral] plugin to the main
Fix wrong behaviour when plugin fails during serve
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/rr/main.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/rr/main.go b/cmd/rr/main.go index 54a1f060..782dfc56 100644 --- a/cmd/rr/main.go +++ b/cmd/rr/main.go @@ -23,6 +23,7 @@ package main import ( + "github.com/spiral/jobs/v2/broker/ephemeral" rr "github.com/spiral/roadrunner/cmd/rr/cmd" // services (plugins) @@ -37,6 +38,7 @@ import ( "github.com/spiral/roadrunner/service/rpc" "github.com/spiral/roadrunner/service/static" + "github.com/spiral/jobs/v2" // additional commands and debug handlers _ "github.com/spiral/roadrunner/cmd/rr/http" _ "github.com/spiral/roadrunner/cmd/rr/limit" @@ -54,6 +56,12 @@ func main() { rr.Container.Register(gzip.ID, &gzip.Service{}) rr.Container.Register(reload.ID, &reload.Service{}) + rr.Container.Register(jobs.ID, &jobs.Service{ + Brokers: map[string]jobs.Broker{ + "ephemeral": &ephemeral.Broker{}, + }, + }) + // you can register additional commands using cmd.CLI rr.Execute() } |