Skip to content

Commit 1d4ffee

Browse files
authored
Add disabled notice to AnalyzeChangeJob (#1091)
We've disabled `AnalyzeChangeJob` via configuration in production. Since we also expect to never make use of it again, I've added a note in the code (I opted not to delete it in case it needs to get turned on in the future -- someone could always go get it back from the git history, but since there is no technical maintainer to replace me, I'm worried that's too big of a barrier.) Fixes #1090.
1 parent f01ad68 commit 1d4ffee

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

app/jobs/analyze_change_job.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# NOTE: THIS JOB IS NOT IN ACTIVE USE.
2+
# The use cases it served were better solved by the task-sheets project
3+
# (https://github.com/edgi-govdata-archiving/web-monitoring-task-sheets).
4+
# That said, the outputs there were never integrated into the database here in
5+
# an automated way, which this job did.
6+
#
7+
# The job code here is preserved in case we need to turn it back on.
18
class AnalyzeChangeJob < ApplicationJob
29
queue_as :analysis
310

app/jobs/import_versions_job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def perform(import)
3232
Rails.logger.error "Import #{import.id}: Cannot queue AnalyzeChangeJob -- #{error.message}"
3333
end
3434
else
35-
Rails.logger.warn "Import #{import.id}: Auto-analysis requirements are not configured; AnalyzeChangeJobs were not scheduled for imported versions."
35+
Rails.logger.warn "Import #{import.id}: Auto-analysis is not configured; AnalyzeChangeJobs were not scheduled for imported versions."
3636
end
3737
end
3838

test/jobs/import_versions_job_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def teardown
108108
"[import=#{import.id}][row=0] Found Page #{page.uuid}",
109109
"[import=#{import.id}][row=0] Replaced Version #{versions(:page1_v5).uuid}",
110110
"[import=#{import.id}] Finished Import #{import.id}",
111-
"Import #{import.id}: Auto-analysis requirements are not configured; AnalyzeChangeJobs were not scheduled for imported versions."
111+
"Import #{import.id}: Auto-analysis is not configured; AnalyzeChangeJobs were not scheduled for imported versions."
112112
], Rails.logger.logs, 'Logs are not as expected.')
113113
end
114114

0 commit comments

Comments
 (0)