mirror of
https://github.com/benbusby/farside.git
synced 2025-06-08 18:36:36 +00:00
add error handling
This commit is contained in:
parent
0e17984d6f
commit
03e46f81f8
12 changed files with 57 additions and 36 deletions
|
@ -3,6 +3,7 @@ defmodule Farside.Server.DeadCheck do
|
|||
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
|
||||
"""
|
||||
use Task
|
||||
alias Farside.LastUpdated
|
||||
|
||||
def child_spec(args) do
|
||||
%{
|
||||
|
@ -26,6 +27,8 @@ defmodule Farside.Server.DeadCheck do
|
|||
end
|
||||
|
||||
def run() do
|
||||
LastUpdated.value(DateTime.utc_now())
|
||||
|
||||
Registry.dispatch(:status, "dead", fn entries ->
|
||||
for {pid, _} <- entries, do: GenServer.cast(pid, :check)
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue