diff --git a/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts b/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts index 3f849370..d08079a4 100644 --- a/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts +++ b/src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts @@ -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; } } -} \ No newline at end of file +} diff --git a/src/api/integrations/event/rabbitmq/rabbitmq.controller.ts b/src/api/integrations/event/rabbitmq/rabbitmq.controller.ts index 89436f9f..07694f5f 100644 --- a/src/api/integrations/event/rabbitmq/rabbitmq.controller.ts +++ b/src/api/integrations/event/rabbitmq/rabbitmq.controller.ts @@ -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) => {