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
4
4
5
5
def perform ( limit : nil )
6
6
Page . upsert_collection_from_sitepress! ( limit : limit )
7
+
8
+ Pages ::RefreshSearchIndexJob . perform_later
9
+ Pages ::BatchAnalyzeTopicsJob . perform_later
7
10
end
8
11
end
9
12
end
Original file line number Diff line number Diff line change 1
1
namespace :deploy do
2
2
desc "Post deploy script"
3
3
task finish : :environment do
4
- Pages ::RefreshSearchIndexJob . perform_later
5
- Pages ::BatchAnalyzeTopicsJob . perform_later
4
+ Pages ::BatchUpsertPagesJob . perform_later
6
5
end
7
6
end
Original file line number Diff line number Diff line change 26
26
described_class . perform_now ( limit : 3 )
27
27
} . to change ( Page , :count ) . by ( 3 )
28
28
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
29
39
end
You can’t perform that action at this time.
0 commit comments