mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
try catch around semaphore lock
This commit is contained in:
parent
e59d2f0a0e
commit
dab7fe584a
@ -170,6 +170,7 @@ export class TransactionLinkResolver {
|
||||
if (code.match(/^CL-/)) {
|
||||
// acquire lock
|
||||
const releaseLock = await TRANSACTIONS_LOCK.acquire()
|
||||
try {
|
||||
logger.info('redeem contribution link...')
|
||||
const now = new Date()
|
||||
const queryRunner = getConnection().createQueryRunner()
|
||||
@ -312,6 +313,8 @@ export class TransactionLinkResolver {
|
||||
throw new Error(`Creation from contribution link was not successful. ${e}`)
|
||||
} finally {
|
||||
await queryRunner.release()
|
||||
}
|
||||
} finally {
|
||||
releaseLock()
|
||||
}
|
||||
return true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user