1
0
Fork 0
mirror of https://github.com/benbusby/farside.git synced 2025-06-08 10:26:36 +00:00

filter out duplicate services

This commit is contained in:
mithereal 2022-09-25 17:16:05 -07:00
parent d5bac455a9
commit 65f6e3adfd
2 changed files with 3 additions and 2 deletions

View file

@ -119,6 +119,7 @@ defmodule Farside do
instance instance
end end
|> Enum.reject(fn x -> x == nil end) |> Enum.reject(fn x -> x == nil end)
|> Enum.uniq()
service = service =
Map.put( Map.put(

View file

@ -1,6 +1,6 @@
defmodule Farside.Server.DeadCheck do defmodule Farside.Server.DeadCheck do
@moduledoc """ @moduledoc """
Module to check/validate the instance list only for servers with empty instance list every 90 secs, if a sync/check process isnt already running Module to check/validate the instance list only for servers with empty instance list every 12 hrs, if a sync/check process isnt already running
""" """
use Task use Task
alias Farside.LastUpdated alias Farside.LastUpdated
@ -22,7 +22,7 @@ defmodule Farside.Server.DeadCheck do
def poll() do def poll() do
receive do receive do
after after
86_400_000 -> 43_200_000 ->
run() run()
poll() poll()
end end