add license boilerplate to pleroma core
[akkoma] / lib / pleroma / web / federator / retry_queue.ex
index 13df40c809cd2723d41889f4614eda1eece30af3..5f1d430084c5b403a032d25c552058cf881a5ac6 100644 (file)
@@ -1,13 +1,12 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
 defmodule Pleroma.Web.Federator.RetryQueue do
   use GenServer
-  alias Pleroma.Web.{WebFinger, Websub}
-  alias Pleroma.Web.ActivityPub.ActivityPub
+
   require Logger
 
-  @websub Application.get_env(:pleroma, :websub)
-  @ostatus Application.get_env(:pleroma, :websub)
-  @httpoison Application.get_env(:pleroma, :websub)
-  @instance Application.get_env(:pleroma, :websub)
   # initial timeout, 5 min
   @initial_timeout 30_000
   @max_retries 5
@@ -46,7 +45,7 @@ defmodule Pleroma.Web.Federator.RetryQueue do
         Process.send_after(
           __MODULE__,
           {:send, data, transport, retries},
-          growth_function(retries)
+          timeout
         )
 
         {:noreply, state}
@@ -62,7 +61,7 @@ defmodule Pleroma.Web.Federator.RetryQueue do
       {:ok, _} ->
         {:noreply, %{state | delivered: delivery_count + 1}}
 
-      {:error, reason} ->
+      {:error, _reason} ->
         enqueue(data, transport, retries)
         {:noreply, state}
     end