refs #4823 Minor changes
This commit is contained in:
parent
9b5922b241
commit
d2f55ef225
|
@ -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;
|
||||||
|
|
4
utils.js
4
utils.js
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue