1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Config.Oban do
9 oban_config = Pleroma.Config.get(Oban)
13 Pleroma.Workers.Cron.StatsWorker,
14 Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker,
15 Pleroma.Workers.Cron.ClearOauthTokenWorker
17 |> Enum.reduce(oban_config[:crontab], fn removed_worker, acc ->
18 with acc when is_list(acc) <- acc,
19 setting when is_tuple(setting) <-
20 Enum.find(acc, fn {_, worker} -> worker == removed_worker end) do
22 !!!OBAN CONFIG WARNING!!!
23 You are using old workers in Oban crontab settings, which were removed.
24 Please, remove setting from crontab in your config file (prod.secret.exs): #{inspect(setting)}
28 List.delete(acc, setting)
34 Pleroma.Config.put(Oban, Keyword.put(oban_config, :crontab, crontab))