This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DeadlockRetry | |
DEADLOCK_ERROR_MESSAGES = ["Deadlock found when trying to get lock", "Lock wait timeout exceeded"] | |
MAXIMUM_RETRIES_ON_DEADLOCK = 10 | |
class << self | |
def deadlock_free(object, &block) | |
retry_count = 0 | |
begin |