refs #4823 Minor changes

This commit is contained in:
Guillermo Bonet 2023-06-15 14:51:58 +02:00
parent 9b5922b241
commit d2f55ef225
2 changed files with 3 additions and 5 deletions

View File

@ -49,13 +49,11 @@ class Floriday {
async trunk() { async trunk() {
try{ try{
/*
for (let model of flModels) for (let model of flModels)
await utils.syncModel(model); await utils.syncModel(model);
await utils.checkConnections(); await utils.checkConnections();
*/
await utils.deleteConnections();
} catch (err) { } catch (err) {
if (['SequelizeConnectionRefusedError', 'SequelizeConnectionError'].includes(err.name)) if (['SequelizeConnectionRefusedError', 'SequelizeConnectionError'].includes(err.name))
throw err; throw err;

View File

@ -662,7 +662,7 @@ export async function createConnections() {
where: { isConnected: true } where: { isConnected: true }
}); });
let connectionsToPut = [], i = 1; let connectionsToPut = [], i = 0;
dbConnections.forEach(valor => { dbConnections.forEach(valor => {
if (!flConnections.includes(valor.organizationId)) if (!flConnections.includes(valor.organizationId))
connectionsToPut.push(valor.organizationId); connectionsToPut.push(valor.organizationId);
@ -688,7 +688,7 @@ export async function deleteConnections() {
where: { isConnected: true } where: { isConnected: true }
}); });
let ghostConnections = [], i = 1; let ghostConnections = [], i = 0;
flConnections.forEach(valor => { flConnections.forEach(valor => {
if (!dbConnections.includes(valor)) if (!dbConnections.includes(valor))
ghostConnections.push(valor); ghostConnections.push(valor);