Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 5c73051

Browse files
committed
DEV: Surface topic_id in errors of summarization backfill
This update ensures that the `topic_id` related to the error when summarizing is surfaced in the logs, which should help track down the reason for the errors.
1 parent 625442a commit 5c73051

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/jobs/scheduled/summaries_backfill.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ def try_summarize(strategy, user, topic)
3636
existing_summary = strategy.existing_summary
3737

3838
if existing_summary.blank? || existing_summary.outdated
39-
strategy.summarize(user)
39+
begin
40+
strategy.summarize(user)
41+
rescue => e
42+
Rails.logger.error("Error summarizing topic #{topic.id}: #{e.class.name} - #{e.message}")
43+
raise e
44+
end
4045
else
4146
# Hiding or deleting a post, and creating a small action alters the Topic#highest_post_number.
4247
# We use this as a quick way to select potential backfill candidates without relying on original_content_sha.

0 commit comments

Comments
 (0)