X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=lib%2Fpleroma%2Fworkers%2Fcron%2Fpurge_expired_activities_worker.ex;h=0de8edd245b8e938c6b829e11387b0acd8c21eae;hb=3515cb5c3ac138c3e19eacc8fd78bb1480e3a98c;hp=7a52860a9722c2efdda601f9949302ac1e5b7d06;hpb=24c526a0b18b822ae339a481934bfa66b13bba54;p=akkoma
diff --git a/lib/pleroma/workers/cron/purge_expired_activities_worker.ex b/lib/pleroma/workers/cron/purge_expired_activities_worker.ex
index 7a52860a9..0de8edd24 100644
--- a/lib/pleroma/workers/cron/purge_expired_activities_worker.ex
+++ b/lib/pleroma/workers/cron/purge_expired_activities_worker.ex
@@ -1,5 +1,5 @@
# 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.PurgeExpiredActivitiesWorker do
@@ -20,10 +20,13 @@ defmodule Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker do
@interval :timer.minutes(1)
@impl Oban.Worker
- def perform(_opts, _job) do
- if Config.get([ActivityExpiration, :enabled]) do
- Enum.each(ActivityExpiration.due_expirations(@interval), &delete_activity/1)
- end
+ def perform(_job) do
+ if Config.get([ActivityExpiration, :enabled]) do
+ Enum.each(ActivityExpiration.due_expirations(@interval), &delete_activity/1)
+ end
+
+ after
+ :ok
end
def delete_activity(%ActivityExpiration{activity_id: activity_id}) do
@@ -39,7 +42,7 @@ defmodule Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker do
{:user, _} ->
Logger.error(
- "#{__MODULE__} Couldn't delete expired activity: not found actorof ##{activity_id}"
+ "#{__MODULE__} Couldn't delete expired activity: not found actor of ##{activity_id}"
)
end
end