X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=lib%2Fpleroma%2Fworkers%2Fcron%2Fclear_oauth_token_worker.ex;h=d41be4e87be28b19c1306b1bc349da51340368dd;hb=db529d454ebd2fa47f70c916c60960b3842826da;hp=1a4cdc1986f3a3795177f9ad9ec30910b26ab5a1;hpb=cf19bf3c7c82eb64f10cee309484d9591b1a3cae;p=akkoma
diff --git a/lib/pleroma/workers/cron/clear_oauth_token_worker.ex b/lib/pleroma/workers/cron/clear_oauth_token_worker.ex
index 1a4cdc198..d41be4e87 100644
--- a/lib/pleroma/workers/cron/clear_oauth_token_worker.ex
+++ b/lib/pleroma/workers/cron/clear_oauth_token_worker.ex
@@ -1,10 +1,10 @@
# 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.Workers.Cron.ClearOauthTokenWorker do
@moduledoc """
- The worker to clean an expired oauth tokens.
+ The worker to cleanup expired oAuth tokens.
"""
use Oban.Worker, queue: "background"
@@ -13,9 +13,11 @@ defmodule Pleroma.Workers.Cron.ClearOauthTokenWorker do
alias Pleroma.Web.OAuth.Token
@impl Oban.Worker
- def perform(_opts, _job) do
+ def perform(_job) do
if Config.get([:oauth2, :clean_expired_tokens], false) do
Token.delete_expired_tokens()
+ else
+ :ok
end
end
end