From e94a80d4586d5a5fedc2edab850c5c8bad93395f Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Fri, 10 Sep 2021 19:05:37 +0300 Subject: fix issue with incorrectly parsing local and global configuration Signed-off-by: Valery Piashchynski --- plugins/memory/memoryjobs/consumer.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/memory/memoryjobs/consumer.go') diff --git a/plugins/memory/memoryjobs/consumer.go b/plugins/memory/memoryjobs/consumer.go index fbdedefe..bebea3ce 100644 --- a/plugins/memory/memoryjobs/consumer.go +++ b/plugins/memory/memoryjobs/consumer.go @@ -61,6 +61,10 @@ func NewJobBroker(configKey string, log logger.Logger, cfg config.Configurer, eh return nil, errors.E(op, err) } + if jb.cfg == nil { + return nil, errors.E(op, errors.Errorf("config not found by provided key: %s", configKey)) + } + if jb.cfg.Prefetch == 0 { jb.cfg.Prefetch = 100_000 } -- cgit v1.2.3