Oban Jobs for refreshing users were not respecting the uniqueness setting
This commit is contained in:
parent
394cb1e0f5
commit
51a36bc9b8
1
changelog.d/oban-user-refresh-unique.fix
Normal file
1
changelog.d/oban-user-refresh-unique.fix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Oban Jobs for refreshing users were not respecting the uniqueness setting
|
@ -3,11 +3,11 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Workers.UserRefreshWorker do
|
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
|
alias Pleroma.User
|
||||||
|
|
||||||
@impl Oban.Worker
|
@impl true
|
||||||
def perform(%Job{args: %{"ap_id" => ap_id}}) do
|
def perform(%Job{args: %{"ap_id" => ap_id}}) do
|
||||||
User.fetch_by_ap_id(ap_id)
|
User.fetch_by_ap_id(ap_id)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user