Ensure that persistable channel queue is added to manager
This commit is contained in:
parent
99a6f484fd
commit
52ee212c95
|
@ -74,14 +74,16 @@ func NewPersistableChannelQueue(handle HandlerFunc, cfg, exemplar interface{}) (
|
||||||
|
|
||||||
levelQueue, err := NewLevelQueue(handle, levelCfg, exemplar)
|
levelQueue, err := NewLevelQueue(handle, levelCfg, exemplar)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return &PersistableChannelQueue{
|
queue := &PersistableChannelQueue{
|
||||||
ChannelQueue: channelQueue.(*ChannelQueue),
|
ChannelQueue: channelQueue.(*ChannelQueue),
|
||||||
delayedStarter: delayedStarter{
|
delayedStarter: delayedStarter{
|
||||||
internal: levelQueue.(*LevelQueue),
|
internal: levelQueue.(*LevelQueue),
|
||||||
name: config.Name,
|
name: config.Name,
|
||||||
},
|
},
|
||||||
closed: make(chan struct{}),
|
closed: make(chan struct{}),
|
||||||
}, nil
|
}
|
||||||
|
_ = GetManager().Add(queue, PersistableChannelQueueType, config, exemplar, nil)
|
||||||
|
return queue, nil
|
||||||
}
|
}
|
||||||
if IsErrInvalidConfiguration(err) {
|
if IsErrInvalidConfiguration(err) {
|
||||||
// Retrying ain't gonna make this any better...
|
// Retrying ain't gonna make this any better...
|
||||||
|
|
Loading…
Reference in New Issue