summaryrefslogtreecommitdiff
path: root/plugins/jobs/config.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-08 14:28:05 +0300
committerValery Piashchynski <[email protected]>2021-07-08 14:28:05 +0300
commit05956485a121ee47a2f8281a8a0dffd7eecc68aa (patch)
tree1fd0ffd60c1731ea6934300506c3061f6e65d1d7 /plugins/jobs/config.go
parentc7becb2fc51fc09523f6640eb72f360a6b4681f5 (diff)
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 <[email protected]>
Diffstat (limited to 'plugins/jobs/config.go')
-rw-r--r--plugins/jobs/config.go8
1 files changed, 8 insertions, 0 deletions
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())
}