feat(http): back off from hosts that answer 429 or 503
Object fetches and WebFinger stop sending requests to a host until Retry-After or X-RateLimit-Reset (default 5 minutes, max 1 hour). Ported from Akkoma's Pleroma.HTTP.Backoff. Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk> Co-authored-by: Oneric <oneric@oneric.stub>
This commit is contained in:
parent
3e9dc477c9
commit
8ce283f966
10 changed files with 330 additions and 5 deletions
|
|
@ -17,7 +17,7 @@ defmodule Mix.Pleroma do
|
|||
:oban,
|
||||
:logger_backends
|
||||
]
|
||||
@cachex_children ["object", "user", "scrubber", "web_resp"]
|
||||
@cachex_children ["object", "user", "scrubber", "web_resp", "http_backoff"]
|
||||
@doc "Common functions to be reused in mix tasks"
|
||||
def start_pleroma do
|
||||
Pleroma.Config.Holder.save_default()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue