New method of saving sessions to a file using worker

This commit is contained in:
Davidson Gomes
2024-06-01 09:54:56 -03:00
parent f7c9541f5e
commit 696261d749
12 changed files with 349 additions and 7 deletions

View File

@@ -12,6 +12,7 @@ import { RabbitmqService } from '../integrations/rabbitmq/services/rabbitmq.serv
import { SqsService } from '../integrations/sqs/services/sqs.service';
import { TypebotService } from '../integrations/typebot/services/typebot.service';
import { WebsocketService } from '../integrations/websocket/services/websocket.service';
import { ProviderFiles } from '../provider/sessions';
import { RepositoryBroker } from '../repository/repository.manager';
import { AuthService, OldToken } from '../services/auth.service';
import { CacheService } from '../services/cache.service';
@@ -43,6 +44,7 @@ export class InstanceController {
private readonly cache: CacheService,
private readonly chatwootCache: CacheService,
private readonly messagesLostCache: CacheService,
private readonly providerFiles: ProviderFiles,
) {}
private readonly logger = new Logger(InstanceController.name);
@@ -111,6 +113,7 @@ export class InstanceController {
this.cache,
this.chatwootCache,
this.messagesLostCache,
this.providerFiles,
);
} else {
instance = new BaileysStartupService(
@@ -120,6 +123,7 @@ export class InstanceController {
this.cache,
this.chatwootCache,
this.messagesLostCache,
this.providerFiles,
);
}