forked from YokaiRick/akkoma
Merge branch 'fix/oban-warnings' into 'develop'
Fix Oban warnings See merge request pleroma/pleroma!2587
This commit is contained in:
commit
b233c8e55c
4 changed files with 10 additions and 0 deletions
|
@ -16,6 +16,8 @@ defmodule Pleroma.Workers.Cron.ClearOauthTokenWorker do
|
||||||
def perform(_opts, _job) do
|
def perform(_opts, _job) do
|
||||||
if Config.get([:oauth2, :clean_expired_tokens], false) do
|
if Config.get([:oauth2, :clean_expired_tokens], false) do
|
||||||
Token.delete_expired_tokens()
|
Token.delete_expired_tokens()
|
||||||
|
else
|
||||||
|
:ok
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -37,6 +37,8 @@ def perform(_opts, _job) do
|
||||||
)
|
)
|
||||||
|> Repo.all()
|
|> Repo.all()
|
||||||
|> send_emails
|
|> send_emails
|
||||||
|
else
|
||||||
|
:ok
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,11 @@ def perform(_args, _job) do
|
||||||
|> Repo.all()
|
|> Repo.all()
|
||||||
|> Enum.map(&Pleroma.Emails.NewUsersDigestEmail.new_users(&1, users_and_statuses))
|
|> Enum.map(&Pleroma.Emails.NewUsersDigestEmail.new_users(&1, users_and_statuses))
|
||||||
|> Enum.each(&Pleroma.Emails.Mailer.deliver/1)
|
|> Enum.each(&Pleroma.Emails.Mailer.deliver/1)
|
||||||
|
else
|
||||||
|
:ok
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
:ok
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,6 +23,8 @@ defmodule Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker do
|
||||||
def perform(_opts, _job) do
|
def perform(_opts, _job) do
|
||||||
if Config.get([ActivityExpiration, :enabled]) do
|
if Config.get([ActivityExpiration, :enabled]) do
|
||||||
Enum.each(ActivityExpiration.due_expirations(@interval), &delete_activity/1)
|
Enum.each(ActivityExpiration.due_expirations(@interval), &delete_activity/1)
|
||||||
|
else
|
||||||
|
:ok
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue