From 8c5335f018566c10340d6eeb04c5ba9c8f5eb380 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 2 Aug 2023 11:18:37 -0700 Subject: [PATCH] Oops, remove some remaining references to Flex We uninstalled Flex, our Elasticsearch gem, to replace item search with direct DB queries; but I forgot these calls, oops! I also kinda want to see about deleting the resque tasks altogether, since I'm not sure how to get Resque installed on latest rails bc there seems to be a conflict over the version of Rack? And it'd be nice to get rid of the complexity if we can. --- app/models/item/create_task.rb | 1 - app/models/item/destroy_task.rb | 1 - app/models/item/update_task.rb | 1 - 3 files changed, 3 deletions(-) diff --git a/app/models/item/create_task.rb b/app/models/item/create_task.rb index 094deca9..8e20d3dc 100644 --- a/app/models/item/create_task.rb +++ b/app/models/item/create_task.rb @@ -8,7 +8,6 @@ class Item def self.perform(id) Timeout::timeout(TIMEOUT_IN_SECONDS) do - Item.find(id).flex.sync expire_newest_items end end diff --git a/app/models/item/destroy_task.rb b/app/models/item/destroy_task.rb index e3eb5caf..ca14d3b5 100644 --- a/app/models/item/destroy_task.rb +++ b/app/models/item/destroy_task.rb @@ -8,7 +8,6 @@ class Item def self.perform(id) Timeout::timeout(TIMEOUT_IN_SECONDS) do - Item.find(id).flex.sync # TODO: it's kinda ugly to reach across classes like this CreateTask.expire_newest_items end diff --git a/app/models/item/update_task.rb b/app/models/item/update_task.rb index 2267b2c0..1e7bc0e4 100644 --- a/app/models/item/update_task.rb +++ b/app/models/item/update_task.rb @@ -10,7 +10,6 @@ class Item Timeout::timeout(TIMEOUT_IN_SECONDS) do item = Item.find(id) expire_cache_for(item) - item.flex.sync end end