1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-18 02:49:18 +00:00

fix cron wroker

This commit is contained in:
Maksim Pechnikov 2020-08-13 21:01:54 +03:00
parent 3515cb5c3a
commit 9b055f7211
5 changed files with 10 additions and 12 deletions

View file

@ -16,8 +16,8 @@ defmodule Pleroma.Workers.Cron.ClearOauthTokenWorker do
def perform(_job) do
if Config.get([:oauth2, :clean_expired_tokens], false) do
Token.delete_expired_tokens()
else
end
:ok
end
end
end

View file

@ -37,9 +37,9 @@ def perform(_job) do
)
|> Repo.all()
|> send_emails
else
:ok
end
:ok
end
def send_emails(users) do

View file

@ -55,11 +55,9 @@ def perform(_job) do
|> Repo.all()
|> Enum.map(&Pleroma.Emails.NewUsersDigestEmail.new_users(&1, users_and_statuses))
|> Enum.each(&Pleroma.Emails.Mailer.deliver/1)
else
:ok
end
else
end
:ok
end
end
end

View file

@ -24,7 +24,6 @@ def perform(_job) do
if Config.get([ActivityExpiration, :enabled]) do
Enum.each(ActivityExpiration.due_expirations(@interval), &delete_activity/1)
end
after
:ok
end

View file

@ -12,5 +12,6 @@ defmodule Pleroma.Workers.Cron.StatsWorker do
@impl Oban.Worker
def perform(_job) do
Pleroma.Stats.do_collect()
:ok
end
end