[#1149] Added more oban workers. Refactoring.
[akkoma] / lib / pleroma / workers / helper.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Workers.Helper do
6 def worker_args(queue) do
7 if max_attempts = Pleroma.Config.get([:workers, :retries, queue]) do
8 [max_attempts: max_attempts]
9 else
10 []
11 end
12 end
13 end