From 8e28e8a18f330696d48070a138a6fa83ef7edfb2 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 20 Sep 2018 23:51:06 +0000 Subject: [PATCH] mix: remove fix_ap_users task, now obsolete --- lib/mix/tasks/fix_ap_users.ex | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 lib/mix/tasks/fix_ap_users.ex diff --git a/lib/mix/tasks/fix_ap_users.ex b/lib/mix/tasks/fix_ap_users.ex deleted file mode 100644 index 7e970850e..000000000 --- a/lib/mix/tasks/fix_ap_users.ex +++ /dev/null @@ -1,28 +0,0 @@ -defmodule Mix.Tasks.FixApUsers do - use Mix.Task - import Ecto.Query - alias Pleroma.{Repo, User} - - @shortdoc "Grab all ap users again" - def run([]) do - Mix.Task.run("app.start") - - q = - from( - u in User, - where: fragment("? @> ?", u.info, ^%{"ap_enabled" => true}), - where: u.local == false - ) - - users = Repo.all(q) - - Enum.each(users, fn user -> - try do - IO.puts("Fetching #{user.nickname}") - Pleroma.Web.ActivityPub.Transmogrifier.upgrade_user_from_ap_id(user.ap_id, false) - rescue - e -> IO.inspect(e) - end - end) - end -end