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
@ -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 New Issue
Block a user