diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-12-17 09:04:43 -0600 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-12-17 09:05:36 -0600 |
commit | 80891e83d8df25b742a321d2c837e38c805e6582 (patch) | |
tree | 915321403b8a1639fa317b72d438b8a61a0eb090 /lib/mix/pleroma.ex | |
parent | 4999efad3f0bb0a70a5be5d5c2b970ab564668ca (diff) | |
parent | 8b8c317c0ff1534d3296369ba315b8919e8dc55c (diff) | |
download | pleroma-80891e83d8df25b742a321d2c837e38c805e6582.tar.gz pleroma-80891e83d8df25b742a321d2c837e38c805e6582.zip |
Merge remote-tracking branch 'upstream/develop' into registration-workflow
Diffstat (limited to 'lib/mix/pleroma.ex')
-rw-r--r-- | lib/mix/pleroma.ex | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/lib/mix/pleroma.ex b/lib/mix/pleroma.ex index 6df1cf538..a33a9951c 100644 --- a/lib/mix/pleroma.ex +++ b/lib/mix/pleroma.ex @@ -12,7 +12,8 @@ defmodule Mix.Pleroma do :cachex, :flake_id, :swoosh, - :timex + :timex, + :fast_html ] @cachex_children ["object", "user", "scrubber", "web_resp"] @doc "Common functions to be reused in mix tasks" @@ -22,8 +23,8 @@ defmodule Mix.Pleroma do Pleroma.Application.limiters_setup() Application.put_env(:phoenix, :serve_endpoints, false, persistent: true) - if Pleroma.Config.get(:env) != :test do - Application.put_env(:logger, :console, level: :debug) + unless System.get_env("DEBUG") do + Logger.remove_backend(:console) end adapter = Application.get_env(:tesla, :adapter) @@ -37,12 +38,23 @@ defmodule Mix.Pleroma do Enum.each(apps, &Application.ensure_all_started/1) + oban_config = [ + crontab: [], + repo: Pleroma.Repo, + log: false, + queues: [], + plugins: [] + ] + children = [ Pleroma.Repo, + Pleroma.Emoji, {Pleroma.Config.TransferTask, false}, Pleroma.Web.Endpoint, - {Oban, Pleroma.Config.get(Oban)} + {Oban, oban_config}, + {Majic.Pool, + [name: Pleroma.MajicPool, pool_size: Pleroma.Config.get([:majic_pool, :size], 2)]} ] ++ http_children(adapter) @@ -98,12 +110,6 @@ defmodule Mix.Pleroma do end end - def shell_yes?(message) do - if mix_shell?(), - do: Mix.shell().yes?("Continue?"), - else: shell_prompt(message, "Continue?") in ~w(Yn Y y) - end - def shell_info(message) do if mix_shell?(), do: Mix.shell().info(message), |