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
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