start oban app in migrations and mix tasks
authorAlexander Strizhakov <alex.strizhakov@gmail.com>
Sun, 17 Jan 2021 06:58:41 +0000 (09:58 +0300)
committerAlexander Strizhakov <alex.strizhakov@gmail.com>
Sun, 17 Jan 2021 06:58:41 +0000 (09:58 +0300)
lib/mix/pleroma.ex
priv/repo/migrations/20200825061316_move_activity_expirations_to_oban.exs
priv/repo/migrations/20200907092050_move_tokens_expiration_into_oban.exs

index 45d0ad6245e70979a5d0bd8ce224520a650ff6c8..2b6c7d6bbd13f364fefa396e66a778d6b480f2d6 100644 (file)
@@ -13,7 +13,8 @@ defmodule Mix.Pleroma do
     :flake_id,
     :swoosh,
     :timex,
-    :fast_html
+    :fast_html,
+    :oban
   ]
   @cachex_children ["object", "user", "scrubber", "web_resp"]
   @doc "Common functions to be reused in mix tasks"
index a703af83fd270064001df1554bb45153dc35d96b..096ab4ce5c7ed58ba837e234fefbf8eae69cb08e 100644 (file)
@@ -6,6 +6,8 @@ defmodule Pleroma.Repo.Migrations.MoveActivityExpirationsToOban do
   def change do
     Pleroma.Config.Oban.warn()
 
+    Application.ensure_all_started(:oban)
+
     Supervisor.start_link([{Oban, Pleroma.Config.get(Oban)}],
       strategy: :one_for_one,
       name: Pleroma.Supervisor
index 9e49ddacbb7fdc6802dc873229cdff1499f8aeeb..725c5ab0b1cd6d2a7baad2369bff07ad2c4c8261 100644 (file)
@@ -6,6 +6,8 @@ defmodule Pleroma.Repo.Migrations.MoveTokensExpirationIntoOban do
   def change do
     Pleroma.Config.Oban.warn()
 
+    Application.ensure_all_started(:oban)
+
     Supervisor.start_link([{Oban, Pleroma.Config.get(Oban)}],
       strategy: :one_for_one,
       name: Pleroma.Supervisor