PubSub not work with redis 4.1.0
gulivero1773 opened this issue · 3 comments
gulivero1773 commented
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Add package with configuration '...'
- Send request with options When I use app.redis.subscribe(to: "service") { (channel, message) in
- No redis found for id default, or the app may not have finished booting. Also, the eventLoop must be from Application's EventLoopGroup.: file Redis/RedisStorage.swift, line 51
2021-02-27 21:25:57.161836+0200 Run[19967:238904] Fatal error: No redis found for id default, or the app may not have finished booting. Also, the eventLoop must be from Application's EventLoopGroup.: file Redis/RedisStorage.swift, line 51
Expected behavior
A clear and concise description of what you expected to happen.
Environment
- Vapor Framework version: 4.41.1
- Vapor Toolbox version: last
- OS version: 11.2.2
Additional context
Add any other context about the problem here.
0xTim commented
@gulivero1773 if you add app.boot()
before you call Redis does that fix it?
gulivero1773 commented
@0xTim Thank you! It works, but I don’t understand why
0xTim commented
@gulivero1773 Redis now needs the boot function to be called to set up its internal state correctly. Unfortunately this isn't yet documented