Skip to content

Commit 3b92942

Browse files
author
KIvanow
committed
-
1 parent 5f4ffd3 commit 3b92942

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

redisinsight/api/src/modules/database-discovery/auto.database-discovery.service.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { ConstantsProvider } from 'src/modules/constants/providers/constants.pro
1515
@Injectable()
1616
export class AutoDatabaseDiscoveryService {
1717
private logger = new Logger('AutoDatabaseDiscoveryService');
18-
private isDiscoveryRunning = false;
1918

2019
constructor(
2120
private redisClientFactory: RedisClientFactory,
@@ -27,19 +26,10 @@ export class AutoDatabaseDiscoveryService {
2726
* Database alias will be "host:port"
2827
*/
2928
async discover(sessionMetadata: SessionMetadata) {
30-
console.log('AutoDatabaseDiscoveryService discover called', this.isDiscoveryRunning);
31-
// Return immediately to not block the main thread
32-
if (this.isDiscoveryRunning) {
33-
return;
34-
}
35-
36-
// Perform the actual discovery in background
37-
this.isDiscoveryRunning = true;
3829
try {
3930
// additional check for existing databases
4031
// We should not start auto discover if any database already exists
4132
if ((await this.databaseService.list(sessionMetadata)).length) {
42-
this.isDiscoveryRunning = false;
4333
return;
4434
}
4535

@@ -56,8 +46,6 @@ export class AutoDatabaseDiscoveryService {
5646
]);
5747
} catch (e) {
5848
this.logger.warn('Unable to discover redis database', e);
59-
} finally {
60-
this.isDiscoveryRunning = false;
6149
}
6250
}
6351

0 commit comments

Comments
 (0)