Skip to content

Remove AnswerAnalysisJob in favour of method#763

Merged
jackbot merged 1 commit into
mainfrom
answer-analysis-job-remove
Jan 9, 2026
Merged

Remove AnswerAnalysisJob in favour of method#763
jackbot merged 1 commit into
mainfrom
answer-analysis-job-remove

Conversation

@jackbot
Copy link
Copy Markdown
Contributor

@jackbot jackbot commented Jan 8, 2026

Rather than enqueuing a background job just to enqueue more background
jobs, we can just do all this in a method instead.

@jackbot jackbot force-pushed the answer-analysis-job-remove branch 2 times, most recently from f42d7d1 to 571d5fa Compare January 8, 2026 10:44
@govuk-ci govuk-ci temporarily deployed to govuk-chat-answer-analy-ktfamj January 8, 2026 10:45 Inactive
Comment thread app/models/answer_analysis.rb Outdated
@@ -0,0 +1,6 @@
module AnswerAnalysis
def self.enqueue_async_analysis(answer)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if this should live in the AutoEvaluation module instead?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably suggest it feels better here given the classes it calls are already under the AnswerAnalysis namespace.

I'd probably suggest we move this module to lib/ though as this isn't a model and we use this namespace in more than just models.

Copy link
Copy Markdown
Contributor

@davidgisbey davidgisbey Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not one for this PR, but maybe we should consider renaming lib/auto_evaluation to lib/answer_analysis so it's consistent. I'm not sure we're gaining anything from them being different atm.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats a reasonable shout. At the moment I'm ok with it as I think of AutoEvaluation as just one aspect of analysis, but given we've got the TopicTagger in there we're probably already using both namespaces interchangeably.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coo, I've moved the module to the lib directory.

Comment thread app/models/answer_analysis.rb Outdated
@@ -0,0 +1,6 @@
module AnswerAnalysis
def self.enqueue_async_analysis(answer)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably suggest it feels better here given the classes it calls are already under the AnswerAnalysis namespace.

I'd probably suggest we move this module to lib/ though as this isn't a model and we use this namespace in more than just models.

Comment thread app/models/answer_analysis.rb Outdated
Rather than enqueuing a background job just to enqueue more background
jobs, we can just do all this in a method instead.
@jackbot jackbot force-pushed the answer-analysis-job-remove branch from 571d5fa to 7e870c4 Compare January 9, 2026 08:57
@govuk-ci govuk-ci temporarily deployed to govuk-chat-answer-analy-ktfamj January 9, 2026 08:57 Inactive
@jackbot jackbot requested a review from kevindew January 9, 2026 09:00
@jackbot jackbot merged commit 32a4ced into main Jan 9, 2026
12 checks passed
@jackbot jackbot deleted the answer-analysis-job-remove branch January 9, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants