refs #4823 Minor changes
This commit is contained in:
parent
9b5922b241
commit
d2f55ef225
|
@ -49,13 +49,11 @@ class Floriday {
|
|||
|
||||
async trunk() {
|
||||
try{
|
||||
/*
|
||||
for (let model of flModels)
|
||||
await utils.syncModel(model);
|
||||
|
||||
await utils.checkConnections();
|
||||
*/
|
||||
await utils.deleteConnections();
|
||||
|
||||
} catch (err) {
|
||||
if (['SequelizeConnectionRefusedError', 'SequelizeConnectionError'].includes(err.name))
|
||||
throw err;
|
||||
|
|
4
utils.js
4
utils.js
|
@ -662,7 +662,7 @@ export async function createConnections() {
|
|||
where: { isConnected: true }
|
||||
});
|
||||
|
||||
let connectionsToPut = [], i = 1;
|
||||
let connectionsToPut = [], i = 0;
|
||||
dbConnections.forEach(valor => {
|
||||
if (!flConnections.includes(valor.organizationId))
|
||||
connectionsToPut.push(valor.organizationId);
|
||||
|
@ -688,7 +688,7 @@ export async function deleteConnections() {
|
|||
where: { isConnected: true }
|
||||
});
|
||||
|
||||
let ghostConnections = [], i = 1;
|
||||
let ghostConnections = [], i = 0;
|
||||
flConnections.forEach(valor => {
|
||||
if (!dbConnections.includes(valor))
|
||||
ghostConnections.push(valor);
|
||||
|
|
Loading…
Reference in New Issue