forked from AkkomaGang/akkoma
fix Cron.PurgeExpiredActivitiesWorker
This commit is contained in:
parent
14a06e63f6
commit
3515cb5c3a
1 changed files with 7 additions and 6 deletions
|
@ -23,9 +23,10 @@ defmodule Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker do
|
||||||
def perform(_job) do
|
def perform(_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
|
||||||
|
|
||||||
|
after
|
||||||
|
:ok
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete_activity(%ActivityExpiration{activity_id: activity_id}) do
|
def delete_activity(%ActivityExpiration{activity_id: activity_id}) do
|
||||||
|
|
Loading…
Reference in a new issue