mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-13 17:43:28 +00:00
DEV: Surface topic_id
in errors of summarization backfill (#1493)
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.
This commit is contained in:
parent
027d7f1199
commit
cf7288e1bf
@ -36,7 +36,12 @@ module ::Jobs
|
||||
existing_summary = strategy.existing_summary
|
||||
|
||||
if existing_summary.blank? || existing_summary.outdated
|
||||
strategy.summarize(user)
|
||||
begin
|
||||
strategy.summarize(user)
|
||||
rescue => e
|
||||
Rails.logger.error("Error summarizing topic #{topic.id}: #{e.class.name} - #{e.message}")
|
||||
raise e
|
||||
end
|
||||
else
|
||||
# Hiding or deleting a post, and creating a small action alters the Topic#highest_post_number.
|
||||
# We use this as a quick way to select potential backfill candidates without relying on original_content_sha.
|
||||
|
Loading…
x
Reference in New Issue
Block a user