Fix migration crashing due to Oban not running

We can use Pleroma.Repo to fetch the jobs
This commit is contained in:
Mark Felder 2024-07-30 10:48:06 -04:00
parent 05d4989795
commit 1bce582f0d

View file

@ -2,6 +2,7 @@ defmodule Pleroma.Repo.Migrations.PublisherJobChange do
use Ecto.Migration use Ecto.Migration
alias Pleroma.Activity alias Pleroma.Activity
alias Pleroma.Repo
import Ecto.Query import Ecto.Query
def up do def up do
@ -11,8 +12,7 @@ defmodule Pleroma.Repo.Migrations.PublisherJobChange do
where: j.state in ["available", "retryable"] where: j.state in ["available", "retryable"]
) )
jobs = jobs = Repo.all(query)
Oban |> Oban.config() |> Oban.Repo.all(query)
Enum.each(jobs, fn job -> Enum.each(jobs, fn job ->
args = job.args args = job.args