Runtime configured emojis

The changes are a bit heavy since the emojis were loaded into module
attributes from filesystem.

This introduces a GenServer using an ETS table to cache in memory the
emojis, and allows a runtime-reload with `Pleroma.Emoji.reload()`.
This commit is contained in:
href 2018-11-05 13:24:00 +01:00
commit 763fc7b44f
No known key found for this signature in database
GPG key ID: EE8296C1A152C325
5 changed files with 206 additions and 128 deletions

View file

@ -13,8 +13,7 @@ defmodule Pleroma.Application do
worker(Pleroma.Config, [Application.get_all_env(:pleroma)]),
# Start the Ecto repository
supervisor(Pleroma.Repo, []),
# Start the endpoint when the application starts
supervisor(Pleroma.Web.Endpoint, []),
worker(Pleroma.Emoji, []),
# Start your own worker by calling: Pleroma.Worker.start_link(arg1, arg2, arg3)
# worker(Pleroma.Worker, [arg1, arg2, arg3]),
worker(
@ -57,8 +56,10 @@ defmodule Pleroma.Application do
id: :cachex_idem
),
worker(Pleroma.Web.Federator, []),
worker(Pleroma.Gopher.Server, []),
worker(Pleroma.Stats, [])
worker(Pleroma.Stats, []),
# Start the endpoint when the application starts
supervisor(Pleroma.Web.Endpoint, []),
worker(Pleroma.Gopher.Server, [])
] ++
if Mix.env() == :test,
do: [],