forked from AkkomaGang/akkoma
Merge branch 'cherry-pick-930cbd6d' into 'maint/1.1'
Backport mediaproxy failure tracking enchancements to maint See merge request pleroma/pleroma!1837
This commit is contained in:
commit
1f99abbeba
1 changed files with 2 additions and 4 deletions
|
@ -401,11 +401,9 @@ defp increase_read_duration(_) do
|
||||||
|
|
||||||
defp client, do: Pleroma.ReverseProxy.Client
|
defp client, do: Pleroma.ReverseProxy.Client
|
||||||
|
|
||||||
defp track_failed_url(url, code, opts) do
|
defp track_failed_url(url, error, opts) do
|
||||||
code = to_string(code)
|
|
||||||
|
|
||||||
ttl =
|
ttl =
|
||||||
if code in ["403", "404"] or String.starts_with?(code, "5") do
|
unless error in [:body_too_large, 400, 204] do
|
||||||
Keyword.get(opts, :failed_request_ttl, @failed_request_ttl)
|
Keyword.get(opts, :failed_request_ttl, @failed_request_ttl)
|
||||||
else
|
else
|
||||||
nil
|
nil
|
||||||
|
|
Loading…
Reference in a new issue