commit: 801a9367d00c0e036d1c157d6ca5c4e46bd0d95f
parent 01fb4776f8bc0e9e6ece7d1e5ea937ff02c1a938
Author: feld <feld@feld.me>
Date: Fri, 28 Jun 2024 14:47:25 +0000
Merge branch 'fix/oban-user-refresh-unique' into 'develop'
Oban Jobs for refreshing users were not respecting the uniqueness setting
See merge request pleroma/pleroma!4164
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/changelog.d/oban-user-refresh-unique.fix b/changelog.d/oban-user-refresh-unique.fix
@@ -0,0 +1 @@
+Oban Jobs for refreshing users were not respecting the uniqueness setting
diff --git a/lib/pleroma/workers/user_refresh_worker.ex b/lib/pleroma/workers/user_refresh_worker.ex
@@ -3,11 +3,11 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.UserRefreshWorker do
- use Pleroma.Workers.WorkerHelper, queue: "background", max_attempts: 1, unique: [period: 300]
+ use Oban.Worker, queue: :background, max_attempts: 1, unique: [period: 300]
alias Pleroma.User
- @impl Oban.Worker
+ @impl true
def perform(%Job{args: %{"ap_id" => ap_id}}) do
User.fetch_by_ap_id(ap_id)
end