start oban app in migrations and mix tasks

This commit is contained in:
Alexander Strizhakov 2021-01-17 09:58:41 +03:00
parent 02dbf1c51d
commit 0e48c80d7f
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
3 changed files with 6 additions and 1 deletions

View file

@ -13,7 +13,8 @@ defmodule Mix.Pleroma do
:flake_id, :flake_id,
:swoosh, :swoosh,
:timex, :timex,
:fast_html :fast_html,
:oban
] ]
@cachex_children ["object", "user", "scrubber", "web_resp"] @cachex_children ["object", "user", "scrubber", "web_resp"]
@doc "Common functions to be reused in mix tasks" @doc "Common functions to be reused in mix tasks"

View file

@ -6,6 +6,8 @@ defmodule Pleroma.Repo.Migrations.MoveActivityExpirationsToOban do
def change do def change do
Pleroma.Config.Oban.warn() Pleroma.Config.Oban.warn()
Application.ensure_all_started(:oban)
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

@ -6,6 +6,8 @@ defmodule Pleroma.Repo.Migrations.MoveTokensExpirationIntoOban do
def change do def change do
Pleroma.Config.Oban.warn() Pleroma.Config.Oban.warn()
Application.ensure_all_started(:oban)
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