DEV: Add more debugging context to onebox generation

Previously if a onebox timed out we would not present the users in the log
with any information regarding the onebox. This makes it very difficult to
debug.

This adds url/topic/user in the debugging output.
This commit is contained in:
Sam Saffron
2020-10-22 15:38:18 +11:00
committed by Alan Guo Xiang Tan
parent b2481adb40
commit 906ec87d26
2 changed files with 3 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ class OneboxController < ApplicationController
return render(body: nil, status: 404) if Oneboxer.recently_failed?(url)
hijack do
hijack(info: "#{url} topic_id: #{topic_id} user_id: #{user_id}") do
Oneboxer.preview_onebox!(user_id)
preview = Oneboxer.preview(url,