From c7fb3f7892416fc40f04c9db73c176e550d92410 Mon Sep 17 00:00:00 2001 From: katiefillingim <67967370+katiefillingim@users.noreply.github.com> Date: Mon, 6 May 2024 11:30:48 -0400 Subject: [PATCH] Revert "redis 5 returns bool instead of int for sadd and srem https://github.com/redis/redis-rb/blob/4.x/CHANGELOG.md#480" This reverts commit af5811971ff6d4a2bc35e73a95fc70c1f9f52c43. --- lib/searchkick/relation_indexer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/searchkick/relation_indexer.rb b/lib/searchkick/relation_indexer.rb index 0afd1601..a90c04dd 100644 --- a/lib/searchkick/relation_indexer.rb +++ b/lib/searchkick/relation_indexer.rb @@ -46,7 +46,7 @@ def batches_left end def batch_completed(batch_id) - Searchkick.with_redis { |r| r.srem?(batches_key, batch_id) } + Searchkick.with_redis { |r| r.srem(batches_key, batch_id) } end private @@ -134,7 +134,7 @@ def full_reindex_async(relation) end def batch_job(class_name, batch_id, record_ids) - Searchkick.with_redis { |r| r.sadd?(batches_key, batch_id) } + Searchkick.with_redis { |r| r.sadd(batches_key, batch_id) } Searchkick::BulkReindexJob.perform_later( class_name: class_name, index_name: index.name,