Skip to content
Snippets Groups Projects
Unverified Commit d5ad8b64 authored by Vyr Cossont's avatar Vyr Cossont Committed by GitHub
Browse files

Fix Redis client and type errors introduced in #24285 (#24342)

parent 280fa3b2
No related branches found
No related tags found
No related merge requests found
......@@ -14,12 +14,10 @@ class Scheduler::IndexingScheduler
indexes.each do |type|
with_redis do |redis|
redis.sscan_each("chewy:queue:#{type.name}", count: SCAN_BATCH_SIZE) do |ids|
redis.pipelined do
ids.each_slice(IMPORT_BATCH_SIZE) do |slice_ids|
type.import!(slice_ids)
redis.srem("chewy:queue:#{type.name}", slice_ids)
end
redis.sscan_each("chewy:queue:#{type.name}", count: SCAN_BATCH_SIZE).each_slice(IMPORT_BATCH_SIZE) do |ids|
type.import!(ids)
redis.pipelined do |pipeline|
pipeline.srem("chewy:queue:#{type.name}", ids)
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment