From 05956485a121ee47a2f8281a8a0dffd7eecc68aa Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 8 Jul 2021 14:28:05 +0300 Subject: Add pipeline and job plugin options... Skeleton for the amqp plugin. Add Timeout and Pipeline to the job.Context() method. Implement queue limits for the ephemeral driver with main priority queue limits. Update configuration, add pipeline_size for every pipeline and jobs priority queue size. Signed-off-by: Valery Piashchynski --- plugins/jobs/config.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins/jobs/config.go') diff --git a/plugins/jobs/config.go b/plugins/jobs/config.go index aa2da2dc..1b613231 100644 --- a/plugins/jobs/config.go +++ b/plugins/jobs/config.go @@ -19,6 +19,10 @@ type Config struct { // Default - num logical cores NumPollers uint8 `mapstructure:"num_pollers"` + // PipelineSize is the limit of a main jobs queue which consume Items from the drivers pipeline + // Driver pipeline might be much larger than a main jobs queue + PipelineSize uint64 `mapstructure:"pipeline_size"` + // Pool configures roadrunner workers pool. Pool *poolImpl.Config `mapstructure:"Pool"` @@ -34,6 +38,10 @@ func (c *Config) InitDefaults() { c.Pool = &poolImpl.Config{} } + if c.PipelineSize == 0 { + c.PipelineSize = 1_000_000 + } + if c.NumPollers == 0 { c.NumPollers = uint8(runtime.NumCPU()) } -- cgit v1.2.3