diff --git a/back/methods/image/scrub.js b/back/methods/image/scrub.js index f713d50c6..e39982df9 100644 --- a/back/methods/image/scrub.js +++ b/back/methods/image/scrub.js @@ -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); + } } }; };