From 52ee212c952ca15aac7eae0dfdb0a95d7d32d400 Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Mon, 6 Jan 2020 17:27:30 +0000 Subject: [PATCH] Ensure that persistable channel queue is added to manager --- modules/queue/queue_disk_channel.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/queue/queue_disk_channel.go b/modules/queue/queue_disk_channel.go index 46a097e84a..895c8ce918 100644 --- a/modules/queue/queue_disk_channel.go +++ b/modules/queue/queue_disk_channel.go @@ -74,14 +74,16 @@ func NewPersistableChannelQueue(handle HandlerFunc, cfg, exemplar interface{}) ( levelQueue, err := NewLevelQueue(handle, levelCfg, exemplar) if err == nil { - return &PersistableChannelQueue{ + queue := &PersistableChannelQueue{ ChannelQueue: channelQueue.(*ChannelQueue), delayedStarter: delayedStarter{ internal: levelQueue.(*LevelQueue), name: config.Name, }, closed: make(chan struct{}), - }, nil + } + _ = GetManager().Add(queue, PersistableChannelQueueType, config, exemplar, nil) + return queue, nil } if IsErrInvalidConfiguration(err) { // Retrying ain't gonna make this any better...