[#1149] Replaced RetryQueue with oban-based retries.
This commit is contained in:
parent
cdfd02e904
commit
23d279e03e
18 changed files with 106 additions and 395 deletions
14
lib/pleroma/workers/publisher.ex
Normal file
14
lib/pleroma/workers/publisher.ex
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue