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 it already exists in the cache, return conversationId
if (await this.cache.has(cacheKey)) { 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}`); this.logger.verbose(`Found conversation to: ${remoteJid}, conversation ID: ${conversationId}`);
return conversationId; return conversationId;
} }
@ -568,9 +568,9 @@ export class ChatwootService {
this.logger.warn(`Timeout aguardando lock para ${remoteJid}`); this.logger.warn(`Timeout aguardando lock para ${remoteJid}`);
break; break;
} }
await new Promise(res => setTimeout(res, 300)); await new Promise((res) => setTimeout(res, 300));
if (await this.cache.has(cacheKey)) { 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}`); this.logger.verbose(`Resolves creation of: ${remoteJid}, conversation ID: ${conversationId}`);
return 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 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)) { 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); const client = await this.clientCw(instance);
@ -2525,4 +2525,4 @@ export class ChatwootService {
return; return;
} }
} }
} }

View File

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