Revert to using primary database in IndexingScheduler (#26754)

This commit is contained in:
Claire 2023-09-01 15:09:44 +02:00 committed by GitHub
parent 8e34673487
commit 5cf3e206bb

View file

@ -16,9 +16,7 @@ class Scheduler::IndexingScheduler
indexes.each do |type|
with_redis do |redis|
redis.sscan_each("chewy:queue:#{type.name}", count: SCAN_BATCH_SIZE).each_slice(IMPORT_BATCH_SIZE) do |ids|
with_read_replica do
type.import!(ids)
end
type.import!(ids)
redis.srem("chewy:queue:#{type.name}", ids)
end