Only try refreshing every 6 hours.

This commit is contained in:
Roger Braun 2017-05-10 19:08:42 +02:00
parent ae0e6d8003
commit d2c4a427f1

View file

@ -10,7 +10,7 @@ defmodule Pleroma.Web.Federator do
def start_link do def start_link do
spawn(fn -> spawn(fn ->
Process.sleep(1000 * 60 * 1) # 10 minutes Process.sleep(1000 * 60 * 1) # 1 minute
enqueue(:refresh_subscriptions, nil) enqueue(:refresh_subscriptions, nil)
end) end)
GenServer.start_link(__MODULE__, {:sets.new(), :queue.new()}, name: __MODULE__) GenServer.start_link(__MODULE__, {:sets.new(), :queue.new()}, name: __MODULE__)
@ -20,7 +20,7 @@ defmodule Pleroma.Web.Federator do
Logger.debug("Federator running refresh subscriptions") Logger.debug("Federator running refresh subscriptions")
Websub.refresh_subscriptions() Websub.refresh_subscriptions()
spawn(fn -> spawn(fn ->
Process.sleep(1000 * 60 * 60) # 60 minutes Process.sleep(1000 * 60 * 60 * 6) # 6 hours
enqueue(:refresh_subscriptions, nil) enqueue(:refresh_subscriptions, nil)
end) end)
end end