Catch what warden might throw when profiling requests to re-throw it
Closes #20488
This commit is contained in:
parent
0819461e84
commit
0720b9ce00
|
@ -44,6 +44,7 @@ v 8.11.0 (unreleased)
|
|||
- Reduce number of queries made for merge_requests/:id/diffs
|
||||
- Sensible state specific default sort order for issues and merge requests !5453 (tomb0y)
|
||||
- Fix RequestProfiler::Middleware error when code is reloaded in development
|
||||
- Catch what warden might throw when profiling requests to re-throw it
|
||||
|
||||
v 8.10.3 (unreleased)
|
||||
- Fix importer for GitHub Pull Requests when a branch was removed
|
||||
|
|
|
@ -29,7 +29,9 @@ module Gitlab
|
|||
def call_with_profiling(env)
|
||||
ret = nil
|
||||
result = RubyProf::Profile.profile do
|
||||
ret = @app.call(env)
|
||||
ret = catch(:warden) do
|
||||
@app.call(env)
|
||||
end
|
||||
end
|
||||
|
||||
printer = RubyProf::CallStackPrinter.new(result)
|
||||
|
@ -41,7 +43,11 @@ module Gitlab
|
|||
printer.print(file)
|
||||
end
|
||||
|
||||
if ret.is_a?(Array)
|
||||
ret
|
||||
else
|
||||
throw(:warden, ret)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue