fix(closure): removed transaction
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
46488aa600
commit
c260917e20
|
@ -12,8 +12,6 @@ module.exports = {
|
||||||
const failedtickets = [];
|
const failedtickets = [];
|
||||||
for (const ticket of tickets) {
|
for (const ticket of tickets) {
|
||||||
try {
|
try {
|
||||||
await db.rawSql('START TRANSACTION');
|
|
||||||
|
|
||||||
await db.rawSql(`CALL vn.ticket_closeByTicket(?)`, [ticket.id]);
|
await db.rawSql(`CALL vn.ticket_closeByTicket(?)`, [ticket.id]);
|
||||||
|
|
||||||
const invoiceOut = await db.findOne(`
|
const invoiceOut = await db.findOne(`
|
||||||
|
@ -91,9 +89,7 @@ module.exports = {
|
||||||
const email = new Email('delivery-note-link', args);
|
const email = new Email('delivery-note-link', args);
|
||||||
await email.send();
|
await email.send();
|
||||||
}
|
}
|
||||||
await db.rawSql('COMMIT');
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await db.rawSql('ROLLBACK');
|
|
||||||
// Domain not found
|
// Domain not found
|
||||||
if (error.responseCode == 450)
|
if (error.responseCode == 450)
|
||||||
return invalidEmail(ticket);
|
return invalidEmail(ticket);
|
||||||
|
|
Loading…
Reference in New Issue