Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
526B

  1. defmodule Pleroma.Repo.Migrations.RemoveBackgroundJobs do
  2. use Ecto.Migration
  3. import Ecto.Query, only: [from: 2]
  4. def up do
  5. from(j in "oban_jobs",
  6. where:
  7. j.queue == ^"background" and
  8. fragment("?->>'op'", j.args) in ^[
  9. "fetch_data_for_activity",
  10. "media_proxy_prefetch",
  11. "media_proxy_preload"
  12. ] and
  13. j.worker == ^"Pleroma.Workers.BackgroundWorker",
  14. select: [:id]
  15. )
  16. |> Pleroma.Repo.delete_all()
  17. end
  18. def down, do: :ok
  19. end