Update monitor.service.ts

This commit is contained in:
Wender Teixeira 2023-09-04 15:18:32 -03:00 committed by GitHub
parent b554d8c19c
commit 402d5af19a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,6 @@ import { join } from 'path';
import { Auth, ConfigService, Database, DelInstance, HttpServer, Redis } from '../../config/env.config'; import { Auth, ConfigService, Database, DelInstance, HttpServer, Redis } from '../../config/env.config';
import { Logger } from '../../config/logger.config'; import { Logger } from '../../config/logger.config';
import { INSTANCE_DIR, STORE_DIR } from '../../config/path.config'; import { INSTANCE_DIR, STORE_DIR } from '../../config/path.config';
import { NotFoundException } from '../../exceptions';
import { dbserver } from '../../libs/db.connect'; import { dbserver } from '../../libs/db.connect';
import { RedisCache } from '../../libs/redis.client'; import { RedisCache } from '../../libs/redis.client';
import { import {
@ -180,7 +179,6 @@ export class WAMonitoringService {
this.logger.verbose('cleaning up instance in redis: ' + instanceName); this.logger.verbose('cleaning up instance in redis: ' + instanceName);
this.cache.reference = instanceName; this.cache.reference = instanceName;
await this.cache.delAll(); await this.cache.delAll();
this.cache.disconnect();
return; return;
} }
@ -263,8 +261,6 @@ export class WAMonitoringService {
} else { } else {
this.logger.verbose('No instance keys found'); this.logger.verbose('No instance keys found');
} }
this.cache.disconnect();
} }
private async loadInstancesFromDatabase() { private async loadInstancesFromDatabase() {