mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-14 04:52:17 +00:00
Fix migration crashing due to Oban not running
We can use Pleroma.Repo to fetch the jobs
This commit is contained in:
parent
05d4989795
commit
1bce582f0d
1 changed files with 2 additions and 2 deletions
|
@ -2,6 +2,7 @@ defmodule Pleroma.Repo.Migrations.PublisherJobChange do
|
|||
use Ecto.Migration
|
||||
|
||||
alias Pleroma.Activity
|
||||
alias Pleroma.Repo
|
||||
import Ecto.Query
|
||||
|
||||
def up do
|
||||
|
@ -11,8 +12,7 @@ defmodule Pleroma.Repo.Migrations.PublisherJobChange do
|
|||
where: j.state in ["available", "retryable"]
|
||||
)
|
||||
|
||||
jobs =
|
||||
Oban |> Oban.config() |> Oban.Repo.all(query)
|
||||
jobs = Repo.all(query)
|
||||
|
||||
Enum.each(jobs, fn job ->
|
||||
args = job.args
|
||||
|
|
Loading…
Reference in a new issue