mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-21 14:23:04 +00:00
Revert to using primary database in IndexingScheduler (#26754)
This commit is contained in:
parent
bb0edb178f
commit
5c0a9aac3b
|
@ -16,9 +16,7 @@ class Scheduler::IndexingScheduler
|
||||||
indexes.each do |type|
|
indexes.each do |type|
|
||||||
with_redis do |redis|
|
with_redis do |redis|
|
||||||
redis.sscan_each("chewy:queue:#{type.name}", count: SCAN_BATCH_SIZE).each_slice(IMPORT_BATCH_SIZE) do |ids|
|
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)
|
||||||
type.import!(ids)
|
|
||||||
end
|
|
||||||
|
|
||||||
redis.srem("chewy:queue:#{type.name}", ids)
|
redis.srem("chewy:queue:#{type.name}", ids)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue