Use withLock{} in JdbcDatabase

1 job for !53 with 78-deadlock in 4 minutes and 23 seconds (queued for 7 seconds)
merge request