Skip to content

Commit

Permalink
postgresql_version was a protected method in AR 3
Browse files Browse the repository at this point in the history
  • Loading branch information
albus522 committed Aug 14, 2024
1 parent 7d95adc commit e5e7366
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/delayed/backend/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e5e7366

Please sign in to comment.