File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ class BatchUpsertPagesJob < ApplicationJob
44
55 def perform ( limit : nil )
66 Page . upsert_collection_from_sitepress! ( limit : limit )
7+
8+ Pages ::RefreshSearchIndexJob . perform_later
9+ Pages ::BatchAnalyzeTopicsJob . perform_later
710 end
811 end
912end
Original file line number Diff line number Diff line change 11namespace :deploy do
22 desc "Post deploy script"
33 task finish : :environment do
4- Pages ::RefreshSearchIndexJob . perform_later
5- Pages ::BatchAnalyzeTopicsJob . perform_later
4+ Pages ::BatchUpsertPagesJob . perform_later
65 end
76end
Original file line number Diff line number Diff line change 2626 described_class . perform_now ( limit : 3 )
2727 } . to change ( Page , :count ) . by ( 3 )
2828 end
29+
30+ it "enqueues refresh search index job and analyze topics job" do
31+ allow ( Pages ::RefreshSearchIndexJob ) . to receive ( :perform_later )
32+ allow ( Pages ::BatchAnalyzeTopicsJob ) . to receive ( :perform_later )
33+
34+ described_class . perform_now
35+
36+ expect ( Pages ::RefreshSearchIndexJob ) . to have_received ( :perform_later )
37+ expect ( Pages ::BatchAnalyzeTopicsJob ) . to have_received ( :perform_later )
38+ end
2939end
You can’t perform that action at this time.
0 commit comments