Factored out Resque::Helpers