mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Instrument preview image drawing
This commit is contained in:
parent
2a934aa3c9
commit
c69c7b3690
1 changed files with 5 additions and 3 deletions
|
@ -43,9 +43,11 @@ module ActiveStorage
|
|||
#
|
||||
# The output tempfile is opened in the directory returned by ActiveStorage::Downloading#tempdir.
|
||||
def draw(*argv) #:doc:
|
||||
Tempfile.open("ActiveStorage", tempdir) do |file|
|
||||
capture(*argv, to: file)
|
||||
yield file
|
||||
ActiveSupport::Notifications.instrument("preview.active_storage") do
|
||||
Tempfile.open("ActiveStorage", tempdir) do |file|
|
||||
capture(*argv, to: file)
|
||||
yield file
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue