[#534] Initial implementation of unreachable federation targets retirement.
This commit is contained in:
parent
4a278cd80a
commit
f161a92cb1
6 changed files with 153 additions and 14 deletions
12
lib/pleroma/instances.ex
Normal file
12
lib/pleroma/instances.ex
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
defmodule Pleroma.Instances do
|
||||
@moduledoc "Instances context."
|
||||
|
||||
@adapter Pleroma.Instances.Instance
|
||||
|
||||
defdelegate reachable?(url), to: @adapter
|
||||
defdelegate set_reachable(url), to: @adapter
|
||||
defdelegate set_unreachable(url, unreachable_since \\ nil), to: @adapter
|
||||
|
||||
def reachability_time_threshold,
|
||||
do: NaiveDateTime.add(NaiveDateTime.utc_now(), -30 * 24 * 3600, :second)
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue