fix: add missing redis client connect call in onModuleInit
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 58s
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 58s
ioredis with lazyConnect: true requires explicit .connect() — without it the client never connects and isHealthy() always returns false. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
3137d58a5d
commit
bced62c8f6
@ -32,6 +32,12 @@ export class RedisService implements OnModuleInit, OnModuleDestroy {
|
||||
this._connected = false;
|
||||
this.logger.warn(`Redis error: ${err.message}`);
|
||||
});
|
||||
|
||||
try {
|
||||
await this.client.connect();
|
||||
} catch (err: any) {
|
||||
this.logger.warn(`Redis connect failed: ${err.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
async onModuleDestroy() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user