mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-21 04:42:20 -06:00
test: delete instances
This commit is contained in:
@@ -141,7 +141,7 @@ export class InstanceController {
|
|||||||
this.logger.verbose('instance: ' + instance.instanceName + ' created');
|
this.logger.verbose('instance: ' + instance.instanceName + ' created');
|
||||||
|
|
||||||
this.waMonitor.waInstances[instance.instanceName] = instance;
|
this.waMonitor.waInstances[instance.instanceName] = instance;
|
||||||
this.waMonitor.delInstanceTime(instance.instanceName);
|
// this.waMonitor.delInstanceTime(instance.instanceName);
|
||||||
|
|
||||||
this.logger.verbose('generating hash');
|
this.logger.verbose('generating hash');
|
||||||
const hash = await this.authService.generateHash(
|
const hash = await this.authService.generateHash(
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ export class WAMonitoringService {
|
|||||||
this.logger.verbose('Database enabled');
|
this.logger.verbose('Database enabled');
|
||||||
await this.repository.dbServer.connect();
|
await this.repository.dbServer.connect();
|
||||||
const collections: any[] = await this.dbInstance.collections();
|
const collections: any[] = await this.dbInstance.collections();
|
||||||
await this.deleteTempInstances(collections);
|
// await this.deleteTempInstances(collections);
|
||||||
if (collections.length > 0) {
|
if (collections.length > 0) {
|
||||||
this.logger.verbose('Reading collections and setting instances');
|
this.logger.verbose('Reading collections and setting instances');
|
||||||
await Promise.all(collections.map((coll) => this.setInstance(coll.namespace.replace(/^[\w-]+\./, ''))));
|
await Promise.all(collections.map((coll) => this.setInstance(coll.namespace.replace(/^[\w-]+\./, ''))));
|
||||||
|
|||||||
Reference in New Issue
Block a user