Skip to content

Commit

Permalink
redis 5 returns bool instead of int for sadd and srem https://github.…
Browse files Browse the repository at this point in the history
  • Loading branch information
katiefillingim committed May 6, 2024
1 parent 2642ebd commit bc7ee8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/searchkick/relation_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit bc7ee8d

Please sign in to comment.