Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85629229
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/changelog.d/oban-user-refresh-unique.fix b/changelog.d/oban-user-refresh-unique.fix
new file mode 100644
index 000000000..5e112c87f
--- /dev/null
+++ 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
index 5842143f8..f43170c8f 100644
--- a/lib/pleroma/workers/user_refresh_worker.ex
+++ b/lib/pleroma/workers/user_refresh_worker.ex
@@ -1,14 +1,14 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# 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
end
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Aug 8, 6:55 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1723183
Default Alt Text
(1 KB)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment