about summary refs log tree commit diff
path: root/app/workers/scheduler
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-11-05 22:31:52 +0100
committerGitHub <noreply@github.com>2022-11-05 22:31:52 +0100
commitd0c9ac39190c71afb581836e770ebace4ad1ef1b (patch)
treeb940a25faea91579e3a27774b1783b4c81f616c0 /app/workers/scheduler
parentd54e7ee61edf028cd51f7362a970acc152afa456 (diff)
Fix indexing scheduler trying to index when Elasticsearch is disabled (#19805)
Fix #19646
Diffstat (limited to 'app/workers/scheduler')
-rw-r--r--app/workers/scheduler/indexing_scheduler.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/scheduler/indexing_scheduler.rb b/app/workers/scheduler/indexing_scheduler.rb
index 3a6f47a29..c42396629 100644
--- a/app/workers/scheduler/indexing_scheduler.rb
+++ b/app/workers/scheduler/indexing_scheduler.rb
@@ -7,6 +7,8 @@ class Scheduler::IndexingScheduler
   sidekiq_options retry: 0
 
   def perform
+    return unless Chewy.enabled?
+
     indexes.each do |type|
       with_redis do |redis|
         ids = redis.smembers("chewy:queue:#{type.name}")