Initialize pool earlier
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
76819ac804
commit
baab9e6051
|
@ -111,10 +111,9 @@ func NewApp(options AppOptions) *App {
|
|||
options: options,
|
||||
}
|
||||
|
||||
app.backend = loadMemoryBackend()
|
||||
app.backend = loadMemoryBackend(options.pool)
|
||||
app.backend.AuthEnabled = options.AuthEnabled
|
||||
app.backend.baseURL = options.BaseURL
|
||||
app.backend.pool = options.pool
|
||||
|
||||
app.hubBackend = &hubIncomingBackend{app.backend, options.BaseURL, options.pool}
|
||||
|
||||
|
|
|
@ -137,8 +137,8 @@ func (b *memoryBackend) save() {
|
|||
jw.Encode(b)
|
||||
}
|
||||
|
||||
func loadMemoryBackend() *memoryBackend {
|
||||
backend := &memoryBackend{}
|
||||
func loadMemoryBackend(pool *redis.Pool) *memoryBackend {
|
||||
backend := &memoryBackend{pool: pool}
|
||||
err := backend.load()
|
||||
if err != nil {
|
||||
log.Printf("Error while loadingbackend: %v\n", err)
|
||||
|
|
Loading…
Reference in New Issue
Block a user