From 5c0a9aac3b2add81ff2a9c7e724dff4eb9c6451b Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 1 Sep 2023 15:09:44 +0200 Subject: [PATCH] Revert to using primary database in IndexingScheduler (#26754) --- app/workers/scheduler/indexing_scheduler.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/workers/scheduler/indexing_scheduler.rb b/app/workers/scheduler/indexing_scheduler.rb index 1b09730c7..ff1b74444 100644 --- a/app/workers/scheduler/indexing_scheduler.rb +++ b/app/workers/scheduler/indexing_scheduler.rb @@ -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