# * +env+ - [Hash] custom environment hash, see the example with `DISABLE_LOCK_RETRIES`
defwith_lock_retries(*args,**kwargs,&block)
iftransaction_open?
raise<<~EOF
#{__callee__} can not be run inside an already open transaction
Use migration-level lock retries instead, see https://docs.gitlab.com/ee/development/migration_style_guide.html#retry-mechanism-when-acquiring-database-locks