diff options
author | Valery Piashchynski <[email protected]> | 2021-07-08 14:28:05 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-08 14:28:05 +0300 |
commit | 05956485a121ee47a2f8281a8a0dffd7eecc68aa (patch) | |
tree | 1fd0ffd60c1731ea6934300506c3061f6e65d1d7 /plugins/jobs/brokers/ephemeral/plugin.go | |
parent | c7becb2fc51fc09523f6640eb72f360a6b4681f5 (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/brokers/ephemeral/plugin.go')
-rw-r--r-- | plugins/jobs/brokers/ephemeral/plugin.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/jobs/brokers/ephemeral/plugin.go b/plugins/jobs/brokers/ephemeral/plugin.go index 3d6a95b7..60c6e245 100644 --- a/plugins/jobs/brokers/ephemeral/plugin.go +++ b/plugins/jobs/brokers/ephemeral/plugin.go @@ -3,6 +3,7 @@ package ephemeral import ( "github.com/spiral/roadrunner/v2/common/jobs" "github.com/spiral/roadrunner/v2/pkg/priorityqueue" + "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/logger" ) @@ -12,10 +13,12 @@ const ( type Plugin struct { log logger.Logger + cfg config.Configurer } -func (p *Plugin) Init(log logger.Logger) error { +func (p *Plugin) Init(log logger.Logger, cfg config.Configurer) error { p.log = log + p.cfg = cfg return nil } @@ -23,6 +26,6 @@ func (p *Plugin) Name() string { return PluginName } -func (p *Plugin) JobsConstruct(_ string, q priorityqueue.Queue) (jobs.Consumer, error) { - return NewJobBroker(q) +func (p *Plugin) JobsConstruct(configKey string, q priorityqueue.Queue) (jobs.Consumer, error) { + return NewJobBroker(configKey, p.log, p.cfg, q) } |