diff options
author | Valery Piashchynski <[email protected]> | 2021-07-07 18:33:04 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-07 18:33:04 +0300 |
commit | 60c229c8506df465586434309af5acd1f84e2406 (patch) | |
tree | 18fdf380b7e032415d656e84bcc3c7a057f194a8 /plugins/jobs/config.go | |
parent | 127186a72d4b8d30f6ada72ade661d8713490728 (diff) |
Updated ephemeral plugin, PQ and protobuf...
Implement core of the root jobs plugin with a proper drivers/pipelines
handling mechanism.
Add delayed jobs for the ephemeral plugin.
Remove ResumeAll, Resume, StopAll, Stop. Replaced with Pause/Resume with
a slice of the pipelines.
Other small improvements.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/config.go')
-rw-r--r-- | plugins/jobs/config.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/jobs/config.go b/plugins/jobs/config.go index 07e2ef38..aa2da2dc 100644 --- a/plugins/jobs/config.go +++ b/plugins/jobs/config.go @@ -7,12 +7,18 @@ import ( "github.com/spiral/roadrunner/v2/plugins/jobs/pipeline" ) +const ( + // name used to set pipeline name + pipelineName string = "name" +) + // Config defines settings for job broker, workers and job-pipeline mapping. type Config struct { // NumPollers configures number of priority queue pollers // Should be no more than 255 // Default - num logical cores NumPollers uint8 `mapstructure:"num_pollers"` + // Pool configures roadrunner workers pool. Pool *poolImpl.Config `mapstructure:"Pool"` @@ -32,5 +38,10 @@ func (c *Config) InitDefaults() { c.NumPollers = uint8(runtime.NumCPU()) } + for k := range c.Pipelines { + // set the pipeline name + c.Pipelines[k].With(pipelineName, k) + } + c.Pool.InitDefaults() } |