mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-22 16:16:34 +00:00
Merge branch 'oban-uniques' into 'develop'
Oban: more unique job constraints See merge request pleroma/pleroma!4253
This commit is contained in:
commit
b871551d97
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.User
|
||||||
alias Pleroma.Web.Federator
|
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
|
@impl true
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
defmodule Pleroma.Workers.RemoteFetcherWorker do
|
defmodule Pleroma.Workers.RemoteFetcherWorker do
|
||||||
alias Pleroma.Object.Fetcher
|
alias Pleroma.Object.Fetcher
|
||||||
|
|
||||||
use Oban.Worker, queue: :background
|
use Oban.Worker, queue: :background, unique: [period: :infinity]
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def perform(%Job{args: %{"op" => "fetch_remote", "id" => id} = args}) do
|
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.Backfill
|
||||||
alias Pleroma.Web.RichMedia.Card
|
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
|
@impl true
|
||||||
def perform(%Job{args: %{"op" => "expire", "url" => url} = _args}) do
|
def perform(%Job{args: %{"op" => "expire", "url" => url} = _args}) do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# 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 Oban.Worker, queue: :background, max_attempts: 1, unique: [period: 300]
|
use Oban.Worker, queue: :background, max_attempts: 1, unique: [period: :infinity]
|
||||||
|
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ defmodule Pleroma.Workers.WebPusherWorker do
|
||||||
alias Pleroma.Repo
|
alias Pleroma.Repo
|
||||||
alias Pleroma.Web.Push.Impl
|
alias Pleroma.Web.Push.Impl
|
||||||
|
|
||||||
use Oban.Worker, queue: :web_push
|
use Oban.Worker, queue: :web_push, unique: [period: :infinity]
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def perform(%Job{args: %{"op" => "web_push", "notification_id" => notification_id}}) do
|
def perform(%Job{args: %{"op" => "web_push", "notification_id" => notification_id}}) do
|
||||||
|
|
Loading…
Reference in a new issue