Switch to using deadlock_retry as a gem