From 1bce582f0de896b2a84cc2ef44f82646276dc255 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 30 Jul 2024 10:48:06 -0400 Subject: [PATCH] Fix migration crashing due to Oban not running We can use Pleroma.Repo to fetch the jobs --- priv/repo/migrations/20240729163838_publisher_job_change.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/priv/repo/migrations/20240729163838_publisher_job_change.exs b/priv/repo/migrations/20240729163838_publisher_job_change.exs index 08d73b5ad..3449e3b3b 100644 --- a/priv/repo/migrations/20240729163838_publisher_job_change.exs +++ b/priv/repo/migrations/20240729163838_publisher_job_change.exs @@ -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