1
0
Fork 0
forked from forgejo/forgejo

Remove dependency on queue from setting

This commit is contained in:
Andrew Thornton 2019-12-31 18:18:03 +00:00
parent 8798a61ba4
commit 030b6d91c8
No known key found for this signature in database
GPG key ID: 3CDE74631F13A748
7 changed files with 91 additions and 66 deletions

View file

@ -59,7 +59,7 @@ func (q *delayedStarter) setInternal(atShutdown func(context.Context, func()), h
q.lock.Unlock()
log.Fatal("Timedout creating queue %v with cfg %v in %s", q.underlying, q.cfg, q.name)
default:
queue, err := CreateQueue(q.underlying, handle, q.cfg, exemplar)
queue, err := NewQueue(q.underlying, handle, q.cfg, exemplar)
if err == nil {
q.internal = queue
q.lock.Unlock()
@ -101,7 +101,7 @@ func NewWrappedQueue(handle HandlerFunc, cfg, exemplar interface{}) (Queue, erro
}
config := configInterface.(WrappedQueueConfiguration)
queue, err := CreateQueue(config.Underlying, handle, config.Config, exemplar)
queue, err := NewQueue(config.Underlying, handle, config.Config, exemplar)
if err == nil {
// Just return the queue there is no need to wrap
return queue, nil