feat: integrate RedisNode management into Project and Query services; enhance RedisNodeService with optimal node selection and connection options; update vm.constants to include RedisPlugin
This commit is contained in:
@ -27,11 +27,9 @@ export class DatabaseNodeService extends DatabaseEncryptionService {
|
||||
return null;
|
||||
}
|
||||
|
||||
return nodes.reduce((optimalNode, currentNode) => {
|
||||
const currentCount = currentNode.databases?.length || 0;
|
||||
const optimalCount = optimalNode.databases?.length || 0;
|
||||
return currentCount < optimalCount ? currentNode : optimalNode;
|
||||
});
|
||||
nodes.sort((a, b) => a.databases.length - b.databases.length);
|
||||
|
||||
return nodes[0];
|
||||
}
|
||||
|
||||
async initDatabase(
|
||||
|
||||
Reference in New Issue
Block a user