feat: set null when stop
gitea/vn-rfid/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-01-27 12:45:25 +01:00
parent 8142dfb430
commit ebbc27b56d
1 changed files with 2 additions and 0 deletions

View File

@ -1,9 +1,11 @@
import con from '../db/connect.js'; import con from '../db/connect.js';
import counter from './counter.js';
export default async(rfids, arcId) => { export default async(rfids, arcId) => {
console.logger.info('PRINTING...'); console.logger.info('PRINTING...');
const palletId = await con.query(`CALL vn.expeditionPallet_build(JSON_ARRAY(?), ?, ?, @palletId);`, [Array.from(codes), arcId, null]); const palletId = await con.query(`CALL vn.expeditionPallet_build(JSON_ARRAY(?), ?, ?, @palletId);`, [Array.from(codes), arcId, null]);
await counter(null, arcId);
if (!palletId) if (!palletId)
console.logger.info({error: 'ERROR_CREATING_PALLET', expeditions: rfids}); console.logger.info({error: 'ERROR_CREATING_PALLET', expeditions: rfids});
}; };