Method: MysqlFramework::Scripts::LockManager#fetch_client

Defined in:
lib/mysql_framework/scripts/lock_manager.rb

#fetch_clientObject

This method is called to retrieve a Redlock client from the pool



65
66
67
68
69
70
# File 'lib/mysql_framework/scripts/lock_manager.rb', line 65

def fetch_client
  @pool.pop(true)
rescue StandardError
  # By not letting redlock retry we will rely on the retry that happens in this class
  Redlock::Client.new([redis_url], retry_jitter: retry_jitter, retry_count: 1, retry_delay: 0)
end