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
This commit is contained in:
feld 2024-06-28 14:47:25 +00:00
commit 801a9367d0
2 changed files with 3 additions and 2 deletions

View file

@ -0,0 +1 @@
Oban Jobs for refreshing users were not respecting the uniqueness setting

View file

@ -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