summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2024-01-20 18:47:25 -0500
committerMark Felder <feld@feld.me>2024-01-20 18:47:25 -0500
commit4bb57d4f25bcdc90a63163ba175b6171c9ddbc33 (patch)
tree884e2c8de9c5a6c8c2116839d17ef65cc7b7ff63 /lib
parentc7eda0b24ade372e4e167ae560a2debb555a6e02 (diff)
downloadpleroma-4bb57d4f25bcdc90a63163ba175b6171c9ddbc33.tar.gz
pleroma-4bb57d4f25bcdc90a63163ba175b6171c9ddbc33.zip
Use config to control background migrators
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/application.ex15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex
index de7d06974..2eda212b3 100644
--- a/lib/pleroma/application.ex
+++ b/lib/pleroma/application.ex
@@ -108,6 +108,7 @@ defmodule Pleroma.Application do
] ++
task_children() ++
dont_run_in_test(@mix_env) ++
+ background_migrators() ++
shout_child(shout_enabled?()) ++
[Pleroma.Gopher.Server]
@@ -218,14 +219,18 @@ defmodule Pleroma.Application do
keys: :duplicate,
partitions: System.schedulers_online()
]}
- ] ++ background_migrators()
+ ]
end
defp background_migrators do
- [
- Pleroma.Migrators.HashtagsTableMigrator,
- Pleroma.Migrators.ContextObjectsDeletionMigrator
- ]
+ if Application.get_env(:pleroma, __MODULE__)[:background_migrators] do
+ [
+ Pleroma.Migrators.HashtagsTableMigrator,
+ Pleroma.Migrators.ContextObjectsDeletionMigrator
+ ]
+ else
+ []
+ end
end
defp shout_child(true) do