[#1149] Replaced RetryQueue with oban-based retries.

This commit is contained in:
Ivan Tashkinov 2019-08-01 17:28:00 +03:00
commit 23d279e03e
18 changed files with 106 additions and 395 deletions

View file

@ -0,0 +1,14 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.Publisher do
use Oban.Worker, queue: "federator_outgoing", max_attempts: 5
@impl Oban.Worker
def perform(%Oban.Job{args: %{module: module_name, params: params}}) do
module_name
|> String.to_atom()
|> apply(:publish_one, [params])
end
end