Comments on 2019-11-16 Pleroma

And I wrote my first Elixir code with the help of @wim_v12e:

diff --git a/lib/mix/tasks/pleroma/user.ex b/lib/mix/tasks/pleroma/user.ex
index a3f8bc945..964209c96 100644
--- a/lib/mix/tasks/pleroma/user.ex
+++ b/lib/mix/tasks/pleroma/user.ex
@@ -442,6 +442,20 @@ defmodule Mix.Tasks.Pleroma.User do
     end
   end
 
+  def run(["list"]) do
+    start_pleroma()
+
+    Pleroma.User.Query.build(%{local: true})
+    |> Pleroma.RepoStreamer.chunk_stream(500)
+    |> Stream.each(fn users ->
+      users
+      |> Enum.each(fn user ->
+        shell_info("#{user.nickname} moderator: #{user.info.is_moderator}, admin: #{user.info.is_admin}, locked: #{user.info.locked}, deactivated: #{user.info.deactivated}")
+      end)
+    end)
+    |> Stream.run()
+  end
+
   defp set_moderator(user, value) do
     info_cng = User.Info.admin_api_update(user.info, %{is_moderator: value})

This allows me to run:

root@sibirocobombus:/opt/pleroma# sudo -Hu pleroma MIX_ENV=prod mix pleroma.user list
Compiling 1 file (.ex)
internal.fetch moderator: false, admin: false, locked: false, deactivated: false
alex moderator: false, admin: true, locked: false, deactivated: false
admin moderator: false, admin: true, locked: false, deactivated: false
kensanata moderator: false, admin: false, locked: false, deactivated: false

– Alex Schroeder 2019-11-17 13:29 UTC


For now I’m happy with Pleroma. Notice how load came back down again after switching from Epicyon to Pleroma and PostgreSQL. I wasn’t running a database before the Pleroma installation.

Load

– Alex Schroeder 2019-11-17 21:11 UTC


It’s still running on my server without acting up. I’m happy even though I had to install a database for it. Should I ever want a lightweight server, another project to look at would be Kibou. It’s written in Rust instead of Erlang+Elixir. Not sure whether I like that better but there it is.

– Alex Schroeder 2019-12-10 21:58 UTC


Upgrade:

sudo -Hu pleroma git pull
sudo -Hu pleroma mix deps.get
sudo systemctl stop pleroma
sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
sudo systemctl start pleroma

– Alex Schroeder 2020-01-02 14:23 UTC


Actually, now that I think about, I think I don’t really use it for anything. I’ll simply uninstall it again. It worked. It was nice. Time to do something else.

– Alex Schroeder 2020-01-07 21:39 UTC


Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. Note: in order to facilitate peer review and fight vandalism, we will store your IP number for a number of days. See Privacy Policy for more information. See Info for text formatting rules. You can edit this page if you need to fix typos. You can subscribe to updates by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.