mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-22 08:06:55 +00:00
Oban: more unique job constraints
This commit is contained in:
parent
2c916ccd89
commit
a887188890
6 changed files with 6 additions and 5 deletions
1
changelog.d/oban-uniques.change
Normal file
1
changelog.d/oban-uniques.change
Normal file
|
@ -0,0 +1 @@
|
|||
Adjust more Oban workers to enforce unique job constraints.
|
|
@ -7,7 +7,7 @@ defmodule Pleroma.Workers.ReceiverWorker do
|
|||
alias Pleroma.User
|
||||
alias Pleroma.Web.Federator
|
||||
|
||||
use Oban.Worker, queue: :federator_incoming, max_attempts: 5
|
||||
use Oban.Worker, queue: :federator_incoming, max_attempts: 5, unique: [period: :infinity]
|
||||
|
||||
@impl true
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
defmodule Pleroma.Workers.RemoteFetcherWorker do
|
||||
alias Pleroma.Object.Fetcher
|
||||
|
||||
use Oban.Worker, queue: :background
|
||||
use Oban.Worker, queue: :background, unique: [period: :infinity]
|
||||
|
||||
@impl true
|
||||
def perform(%Job{args: %{"op" => "fetch_remote", "id" => id} = args}) do
|
||||
|
|
|
@ -7,7 +7,7 @@ defmodule Pleroma.Workers.RichMediaWorker do
|
|||
alias Pleroma.Web.RichMedia.Backfill
|
||||
alias Pleroma.Web.RichMedia.Card
|
||||
|
||||
use Oban.Worker, queue: :background, max_attempts: 3, unique: [period: 300]
|
||||
use Oban.Worker, queue: :background, max_attempts: 3, unique: [period: :infinity]
|
||||
|
||||
@impl true
|
||||
def perform(%Job{args: %{"op" => "expire", "url" => url} = _args}) do
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Workers.UserRefreshWorker do
|
||||
use Oban.Worker, queue: :background, max_attempts: 1, unique: [period: 300]
|
||||
use Oban.Worker, queue: :background, max_attempts: 1, unique: [period: :infinity]
|
||||
|
||||
alias Pleroma.User
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ defmodule Pleroma.Workers.WebPusherWorker do
|
|||
alias Pleroma.Repo
|
||||
alias Pleroma.Web.Push.Impl
|
||||
|
||||
use Oban.Worker, queue: :web_push
|
||||
use Oban.Worker, queue: :web_push, unique: [period: :infinity]
|
||||
|
||||
@impl true
|
||||
def perform(%Job{args: %{"op" => "web_push", "notification_id" => notification_id}}) do
|
||||
|
|
Loading…
Reference in a new issue