Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags...
[akkoma] / lib / pleroma / application.ex
index 9e262235eef83c86b2426924508699ac7c7dc1ef..2ff7562e24d5f89e28e1a8a58be1a04139da928f 100644 (file)
@@ -14,7 +14,7 @@ defmodule Pleroma.Application do
   @name Mix.Project.config()[:name]
   @version Mix.Project.config()[:version]
   @repository Mix.Project.config()[:source_url]
-  @env Mix.env()
+  @mix_env Mix.env()
 
   def name, do: @name
   def version, do: @version
@@ -92,18 +92,19 @@ defmodule Pleroma.Application do
         Pleroma.Web.Plugs.RateLimiter.Supervisor
       ] ++
         cachex_children() ++
-        http_children(adapter, @env) ++
+        http_children(adapter, @mix_env) ++
         [
           Pleroma.Stats,
           Pleroma.JobQueueMonitor,
           {Majic.Pool, [name: Pleroma.MajicPool, pool_size: Config.get([:majic_pool, :size], 2)]},
-          {Oban, Config.get(Oban)}
+          {Oban, Config.get(Oban)},
+          Pleroma.Web.Endpoint
         ] ++
-        task_children(@env) ++
-        dont_run_in_test(@env) ++
+        task_children(@mix_env) ++
+        dont_run_in_test(@mix_env) ++
         chat_child(chat_enabled?()) ++
         [
-          Pleroma.Web.Endpoint,
+          Pleroma.Migrators.HashtagsTableMigrator,
           Pleroma.Gopher.Server
         ]
 
@@ -145,7 +146,7 @@ defmodule Pleroma.Application do
           raise "Invalid custom modules"
 
         {:ok, modules, _warnings} ->
-          if @env != :test do
+          if @mix_env != :test do
             Enum.each(modules, fn mod ->
               Logger.info("Custom module loaded: #{inspect(mod)}")
             end)