Make retry queue optional.
At the moment, it can use a lot of memory really fast.
This commit is contained in:
parent
88b05aeabb
commit
925b05054f
@ -17,7 +17,15 @@ def init(args) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def start_link() do
|
def start_link() do
|
||||||
|
enabled = Pleroma.Config.get([:retry_queue, :enabled], false)
|
||||||
|
|
||||||
|
if enabled do
|
||||||
|
Logger.info("Starting retry queue")
|
||||||
GenServer.start_link(__MODULE__, %{delivered: 0, dropped: 0}, name: __MODULE__)
|
GenServer.start_link(__MODULE__, %{delivered: 0, dropped: 0}, name: __MODULE__)
|
||||||
|
else
|
||||||
|
Logger.info("Retry queue disabled")
|
||||||
|
:ignore
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def enqueue(data, transport, retries \\ 0) do
|
def enqueue(data, transport, retries \\ 0) do
|
||||||
|
Loading…
Reference in New Issue
Block a user