We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9cb777b commit 182e030Copy full SHA for 182e030
app/jobs/index_protip_job.rb
@@ -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
@@ -24,7 +24,7 @@ def perform
24
end
25
26
unindexed_protips.each do |unindexed_protip_id|
27
- IndexProtip.perform_async(unindexed_protip_id)
+ IndexProtipJob.perform_async(unindexed_protip_id)
28
29
30
puts "removed #{nonexistent_protips.count} protips and added #{unindexed_protips.count} protips"
0 commit comments