44a00146aa
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.
16 lines
No EOL
322 B
Ruby
16 lines
No EOL
322 B
Ruby
class Item
|
|
class DestroyTask
|
|
extend FragmentExpiration
|
|
|
|
TIMEOUT_IN_SECONDS = 10
|
|
|
|
@queue = :item_destroy
|
|
|
|
def self.perform(id)
|
|
Timeout::timeout(TIMEOUT_IN_SECONDS) do
|
|
# TODO: it's kinda ugly to reach across classes like this
|
|
CreateTask.expire_newest_items
|
|
end
|
|
end
|
|
end
|
|
end |