[#534] Federation publish requests status control (enforced 2xx response code check).
[akkoma] / lib / pleroma / instances.ex
1 defmodule Pleroma.Instances do
2 @moduledoc "Instances context."
3
4 @adapter Pleroma.Instances.Instance
5
6 defdelegate reachable?(url), to: @adapter
7 defdelegate set_reachable(url), to: @adapter
8 defdelegate set_unreachable(url, unreachable_since \\ nil), to: @adapter
9
10 def reachability_time_threshold,
11 do: NaiveDateTime.add(NaiveDateTime.utc_now(), -30 * 24 * 3600, :second)
12 end