about summary refs log tree commit diff
path: root/lib/chewy
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2020-12-23 01:47:45 +0100
committerClaire <claire.github-309c@sitedethib.com>2020-12-23 01:47:45 +0100
commit537afa00f35dbaa98cbff284683317b411104a82 (patch)
treed71a57d5f5b6bd864ec11cc1c914a6c3b30ba612 /lib/chewy
parent81f4c550b2ed305f39f344d10289b38625f70bf7 (diff)
parent444b21b55ff5768e4cbbaf7cfa8285c65a4b54f9 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/lib/feed_manager.rb`:
  Not a real conflict, glitch-soc-only DM-related method
  too close to changed upstream stuff.
  Ported upstream changes.
- `app/services/batched_remove_status_service.rb`:
  Additional logic in glitch-soc to clear DMs from timelines.
  Ported upstream changes and fixed the DM TL clearing logic.
- `app/workers/scheduler/feed_cleanup_scheduler.rb`:
  Additional code in glitch-soc to clear DM timelines.
  Ported upstream changes.
Diffstat (limited to 'lib/chewy')
-rw-r--r--lib/chewy/strategy/custom_sidekiq.rb25
1 files changed, 3 insertions, 22 deletions
diff --git a/lib/chewy/strategy/custom_sidekiq.rb b/lib/chewy/strategy/custom_sidekiq.rb
index 3e54326ba..794ae4ed4 100644
--- a/lib/chewy/strategy/custom_sidekiq.rb
+++ b/lib/chewy/strategy/custom_sidekiq.rb
@@ -2,29 +2,10 @@
 
 module Chewy
   class Strategy
-    class CustomSidekiq < Base
-      class Worker
-        include ::Sidekiq::Worker
-
-        sidekiq_options queue: 'pull'
-
-        def perform(type, ids, options = {})
-          options[:refresh] = !Chewy.disable_refresh_async if Chewy.disable_refresh_async
-          type.constantize.import!(ids, options)
-        end
-      end
-
-      def update(type, objects, _options = {})
-        return unless Chewy.enabled?
-
-        ids = type.root.id ? Array.wrap(objects) : type.adapter.identify(objects)
-
-        return if ids.empty?
-
-        Worker.perform_async(type.name, ids)
+    class CustomSidekiq < Sidekiq
+      def update(_type, _objects, _options = {})
+        super if Chewy.enabled?
       end
-
-      def leave; end
     end
   end
 end