remove old workers in oban migrations

This commit is contained in:
Alexander Strizhakov 2020-09-13 10:04:50 +03:00
parent 88fe0a262e
commit 65f4e37ee1
No known key found for this signature in database
GPG Key ID: 022896A53AEF1381
2 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,8 @@ defmodule Pleroma.Repo.Migrations.MoveActivityExpirationsToOban do
import Ecto.Query, only: [from: 2] import Ecto.Query, only: [from: 2]
def change do def change do
Pleroma.Config.Oban.warn()
Supervisor.start_link([{Oban, Pleroma.Config.get(Oban)}], Supervisor.start_link([{Oban, Pleroma.Config.get(Oban)}],
strategy: :one_for_one, strategy: :one_for_one,
name: Pleroma.Supervisor name: Pleroma.Supervisor

View File

@ -4,6 +4,8 @@ defmodule Pleroma.Repo.Migrations.MoveTokensExpirationIntoOban do
import Ecto.Query, only: [from: 2] import Ecto.Query, only: [from: 2]
def change do def change do
Pleroma.Config.Oban.warn()
Supervisor.start_link([{Oban, Pleroma.Config.get(Oban)}], Supervisor.start_link([{Oban, Pleroma.Config.get(Oban)}],
strategy: :one_for_one, strategy: :one_for_one,
name: Pleroma.Supervisor name: Pleroma.Supervisor