X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fweb%2Foauth%2Ftoken%2Fclean_worker.ex;h=e3aa4eb7e539a2e4b097eb8db6830793de5389f9;hb=34d7e864db8f9cc7fb73ce2fef8466ce8e09ed85;hp=3c9c580d51f1870ed5810709fe477f7f0726faea;hpb=835ac2157c53e8c85bd3759efe061dbfbdfc367e;p=akkoma
diff --git a/lib/pleroma/web/oauth/token/clean_worker.ex b/lib/pleroma/web/oauth/token/clean_worker.ex
index 3c9c580d5..e3aa4eb7e 100644
--- a/lib/pleroma/web/oauth/token/clean_worker.ex
+++ b/lib/pleroma/web/oauth/token/clean_worker.ex
@@ -1,17 +1,18 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OAuth.Token.CleanWorker do
@moduledoc """
- The module represents functions to clean an expired oauth tokens.
+ The module represents functions to clean an expired OAuth and MFA tokens.
"""
use GenServer
@ten_seconds 10_000
@one_day 86_400_000
- alias Pleroma.Web.OAuth.Token
+ alias Pleroma.MFA
+ alias Pleroma.Web.OAuth
alias Pleroma.Workers.BackgroundWorker
def start_link(_), do: GenServer.start_link(__MODULE__, %{})
@@ -30,5 +31,8 @@ defmodule Pleroma.Web.OAuth.Token.CleanWorker do
{:noreply, state}
end
- def perform(:clean), do: Token.delete_expired_tokens()
+ def perform(:clean) do
+ OAuth.Token.delete_expired_tokens()
+ MFA.Token.delete_expired_tokens()
+ end
end