Revert to using primary database in IndexingScheduler (#26754)

pull/2392/head
Claire 2023-09-01 15:09:44 +02:00 committed by GitHub
parent bb0edb178f
commit 5c0a9aac3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

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
redis.srem("chewy:queue:#{type.name}", ids)
end