Locker is a locking mechanism for limiting the concurrency of ruby code using the database. It presently only works with PostgreSQL.
Nathan Sutton, Justin Greer
gem "locker", "~> 0.0.3"