Remove patch for unsupported redis version (#35155)

This commit is contained in:
Matt Jankowski 2025-06-25 03:53:38 -04:00 committed by GitHub
parent 47fda2df2c
commit 9f16f41678
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 18 deletions

View File

@ -47,7 +47,6 @@ require_relative '../lib/chewy/strategy/mastodon'
require_relative '../lib/chewy/strategy/bypass_with_warning'
require_relative '../lib/rails/engine_extensions'
require_relative '../lib/action_dispatch/remote_ip_extensions'
require_relative '../lib/stoplight/redis_data_store_extensions'
require_relative '../lib/active_record/database_tasks_extensions'
require_relative '../lib/active_record/batches'
require_relative '../lib/simple_navigation/item_extensions'

View File

@ -1,17 +0,0 @@
# frozen_string_literal: true
# Restore compatibility with Redis < 6.2
module Stoplight
module DataStore
module RedisExtensions
def query_failures(light, transaction: @redis)
window_start = Time.now.to_i - light.window_size
transaction.zrevrangebyscore(failures_key(light), Float::INFINITY, window_start)
end
end
end
end
Stoplight::DataStore::Redis.prepend(Stoplight::DataStore::RedisExtensions)