fix: eslint

This commit is contained in:
Willian Coqueiro 2025-05-27 02:10:15 +00:00
parent fc5965938e
commit fb18267ac5
2 changed files with 7 additions and 7 deletions

View File

@ -554,7 +554,7 @@ export class ChatwootService {
// If it already exists in the cache, return conversationId
if (await this.cache.has(cacheKey)) {
const conversationId = await this.cache.get(cacheKey) as number;
const conversationId = (await this.cache.get(cacheKey)) as number;
this.logger.verbose(`Found conversation to: ${remoteJid}, conversation ID: ${conversationId}`);
return conversationId;
}
@ -568,9 +568,9 @@ export class ChatwootService {
this.logger.warn(`Timeout aguardando lock para ${remoteJid}`);
break;
}
await new Promise(res => setTimeout(res, 300));
await new Promise((res) => setTimeout(res, 300));
if (await this.cache.has(cacheKey)) {
const conversationId = await this.cache.get(cacheKey) as number;
const conversationId = (await this.cache.get(cacheKey)) as number;
this.logger.verbose(`Resolves creation of: ${remoteJid}, conversation ID: ${conversationId}`);
return conversationId;
}
@ -587,7 +587,7 @@ export class ChatwootService {
Utilizei uma nova verificação para evitar que outra thread execute entre o terminio do while e o set lock
*/
if (await this.cache.has(cacheKey)) {
return await this.cache.get(cacheKey) as number;
return (await this.cache.get(cacheKey)) as number;
}
const client = await this.clientCw(instance);
@ -2525,4 +2525,4 @@ export class ChatwootService {
return;
}
}
}
}

View File

@ -31,8 +31,8 @@ export class RabbitmqController extends EventController implements EventControll
port: url.port || 5672,
username: url.username || 'guest',
password: url.password || 'guest',
vhost: url.pathname.slice(1) || '/',
frameMax: frameMax
vhost: url.pathname.slice(1) || '/',
frameMax: frameMax,
};
amqp.connect(connectionOptions, (error, connection) => {