File tree Expand file tree Collapse file tree 1 file changed +0
-12
lines changed
redisinsight/api/src/modules/database-discovery Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import { ConstantsProvider } from 'src/modules/constants/providers/constants.pro
1515@Injectable ( )
1616export 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
You can’t perform that action at this time.
0 commit comments