[#3213] Background migration infrastructure refactoring.

Extracted BaseMigrator and BaseMigratorState.
This commit is contained in:
Ivan Tashkinov 2021-03-12 12:18:11 +03:00
commit 3edf45021e
5 changed files with 385 additions and 321 deletions

View file

@ -103,10 +103,7 @@ defmodule Pleroma.Application do
task_children(@mix_env) ++
dont_run_in_test(@mix_env) ++
chat_child(chat_enabled?()) ++
[
Pleroma.Migrators.HashtagsTableMigrator,
Pleroma.Gopher.Server
]
[Pleroma.Gopher.Server]
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
# for other strategies and supported options
@ -231,6 +228,12 @@ defmodule Pleroma.Application do
keys: :duplicate,
partitions: System.schedulers_online()
]}
] ++ background_migrators()
end
defp background_migrators do
[
Pleroma.Migrators.HashtagsTableMigrator
]
end