logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

20200911055909_remove_cron_jobs.exs (611B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Repo.Migrations.RemoveCronJobs do
  5. use Ecto.Migration
  6. import Ecto.Query, only: [from: 2]
  7. def up do
  8. from(j in "oban_jobs",
  9. where:
  10. j.worker in ^[
  11. "Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker",
  12. "Pleroma.Workers.Cron.StatsWorker",
  13. "Pleroma.Workers.Cron.ClearOauthTokenWorker"
  14. ],
  15. select: [:id]
  16. )
  17. |> Pleroma.Repo.delete_all()
  18. end
  19. def down, do: :ok
  20. end