Skip to content

Commit 182e030

Browse files
committed
Restored the IndexProtipJob
1 parent 9cb777b commit 182e030

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

app/jobs/index_protip_job.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class IndexProtipJob
2+
include Sidekiq::Worker
3+
4+
sidekiq_options queue: :high
5+
6+
def perform(protip_id)
7+
protip = Protip.find(protip_id)
8+
protip.tire.update_index unless protip.user.banned?
9+
end
10+
end

app/jobs/search_sync_job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def perform
2424
end
2525

2626
unindexed_protips.each do |unindexed_protip_id|
27-
IndexProtip.perform_async(unindexed_protip_id)
27+
IndexProtipJob.perform_async(unindexed_protip_id)
2828
end
2929

3030
puts "removed #{nonexistent_protips.count} protips and added #{unindexed_protips.count} protips"

0 commit comments

Comments
 (0)