Add command to reload emoji packs from cli for OTP users

Not useful for source releases as we don't have a way to automate connecting to the running instance.
This commit is contained in:
Mark Felder 2020-06-10 13:02:08 -05:00
commit 7c47f791a8
2 changed files with 14 additions and 0 deletions

View file

@ -237,6 +237,12 @@ defmodule Mix.Tasks.Pleroma.Emoji do
end
end
def run(["reload"]) do
start_pleroma()
Pleroma.Emoji.reload()
IO.puts("Emoji packs have been reloaded.")
end
defp fetch_and_decode(from) do
with {:ok, json} <- fetch(from) do
Jason.decode!(json)