diff options
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) } |