[#534] Configurable outgoing federation reachability timeout.
This commit is contained in:
parent
3e9399ec0b
commit
656ed7c84a
4 changed files with 20 additions and 4 deletions
|
|
@ -39,7 +39,8 @@ defmodule Pleroma.Instances.Instance do
|
|||
Repo.all(
|
||||
from(i in Instance,
|
||||
where:
|
||||
i.host in ^hosts and i.unreachable_since <= ^Instances.reachability_time_threshold(),
|
||||
i.host in ^hosts and
|
||||
i.unreachable_since <= ^Instances.reachability_datetime_threshold(),
|
||||
select: i.host
|
||||
)
|
||||
)
|
||||
|
|
@ -51,7 +52,8 @@ defmodule Pleroma.Instances.Instance do
|
|||
!Repo.one(
|
||||
from(i in Instance,
|
||||
where:
|
||||
i.host == ^host(url) and i.unreachable_since <= ^Instances.reachability_time_threshold(),
|
||||
i.host == ^host(url) and
|
||||
i.unreachable_since <= ^Instances.reachability_datetime_threshold(),
|
||||
select: true
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue