summaryrefslogtreecommitdiff
path: root/plugins/memory/memoryjobs/consumer.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-09-10 19:05:37 +0300
committerValery Piashchynski <[email protected]>2021-09-10 19:05:37 +0300
commite94a80d4586d5a5fedc2edab850c5c8bad93395f (patch)
tree4272054647725274abb5ee69e355c1e4262760ea /plugins/memory/memoryjobs/consumer.go
parent8fa86886bd5b3c12cf161fb2c1cdd9a2cd53d1bf (diff)
fix issue with incorrectly parsing local and global configuration
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/memory/memoryjobs/consumer.go')
-rw-r--r--plugins/memory/memoryjobs/consumer.go4
1 files changed, 4 insertions, 0 deletions
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
}