mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Improve external upload debugging (#28627)
* Do not delete created external upload stubs for 2 days instead of 1 hour if enable_upload_debug_mode is true, this aids with server-side debugging. * If using an API call, return the detailed error message if enable_upload_debug_mode is true. In this case the user is not using the UI, so a more detailed message is appropriate. * Add a prefix to log messages in ExternalUploadHelpers, to make it easier to find these in logster.
This commit is contained in:
@ -21,7 +21,7 @@ class ExternalUploadStub < ActiveRecord::Base
|
||||
where(
|
||||
"status = ? AND created_at <= ?",
|
||||
ExternalUploadStub.statuses[:created],
|
||||
CREATED_EXPIRY_HOURS.hours.ago,
|
||||
(SiteSetting.enable_upload_debug_mode ? 48 : CREATED_EXPIRY_HOURS).hours.ago,
|
||||
)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user