fix: Recovering messages lost with redis cache

This commit is contained in:
Davidson Gomes
2024-04-18 17:31:05 -03:00
parent 234a2c71b5
commit 7449102d95
3 changed files with 6 additions and 111 deletions

View File

@@ -151,7 +151,7 @@ export class BaileysStartupService extends WAStartupService {
const cacheConf = this.configService.get<CacheConf>('CACHE');
if ((cacheConf?.REDIS?.ENABLED && cacheConf?.REDIS?.URI !== '') || cacheConf?.LOCAL?.ENABLED) {
setTimeout(async () => {
setInterval(async () => {
this.logger.info('Recovering messages');
this.messagesLostCache.keys().then((keys) => {
keys.forEach(async (key) => {