refs #5553 Improve error handling
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2023-04-18 20:53:49 +02:00
parent dc853213b8
commit 5dd7c7e3bd
1 changed files with 10 additions and 2 deletions

View File

@ -108,8 +108,16 @@ module.exports = Self => {
return cleanCount;
} finally {
await Self.rawSql(`DO RELEASE_LOCK(?)`, [lockName], opts);
await tx.rollback();
try {
await Self.rawSql(`DO RELEASE_LOCK(?)`, [lockName], opts);
} catch (err) {
console.error(err);
}
try {
await tx.rollback();
} catch (err) {
console.error(err);
}
}
};
};