Error and improvements added(fixed).
This commit is contained in:
+11
-2
@@ -15,6 +15,7 @@ faker.locale = "es_MX";
|
||||
const colors = require('colors');
|
||||
const symbols = require('log-symbols');
|
||||
const progress = require('cli-progress');
|
||||
const Inventario = require('../server/models/tablas/Inventario');
|
||||
|
||||
let rows = 100;
|
||||
let faileds = 0;
|
||||
@@ -58,7 +59,11 @@ async function fillingEquipo() {
|
||||
throw new Error();
|
||||
});
|
||||
await fillEquipo(noInventario, idActivoFijo)
|
||||
.catch(() => {
|
||||
.catch(async() => {
|
||||
await Inventario.destroy({
|
||||
where: noInventario
|
||||
})
|
||||
then(() => censo--);
|
||||
console.log(symbols.warning, 'Error creating «equipo»');
|
||||
barequipo.stop();
|
||||
throw new Error();
|
||||
@@ -102,7 +107,11 @@ async function fillingPrinters() {
|
||||
throw new Error();
|
||||
});
|
||||
await fillPrinters(noInventario, idActivoFijo)
|
||||
.catch(() => {
|
||||
.catch(async() => {
|
||||
await Inventario.destroy({
|
||||
where: noInventario
|
||||
})
|
||||
.then(() => censo--);
|
||||
console.log(symbols.warning, 'Error creating «printers»');
|
||||
barprinters.stop();
|
||||
throw new Error();
|
||||
|
||||
Reference in New Issue
Block a user