diff --git a/lib/delayed/backend/active_record.rb b/lib/delayed/backend/active_record.rb index 35b2aa6c..45f1a5fc 100644 --- a/lib/delayed/backend/active_record.rb +++ b/lib/delayed/backend/active_record.rb @@ -138,7 +138,7 @@ def self.reserve_with_scope_using_optimized_postgres(ready_scope, worker, now) # On PostgreSQL >= 9.5 we leverage SKIP LOCK to avoid multiple workers blocking each other # when attempting to get the next available job # https://www.postgresql.org/docs/9.5/sql-select.html#SQL-FOR-UPDATE-SHARE - if connection.respond_to?(:postgresql_version) && connection.postgresql_version >= 9_05_00 # rubocop:disable Style/NumericLiterals + if connection.send(:postgresql_version) >= 9_05_00 # rubocop:disable Style/NumericLiterals subquery += " SKIP LOCKED" end