Fix Activity.delete_all_by_object_ap_id/1 timeout so users can be deleted

This commit is contained in:
Alex Gleason 2021-07-12 16:20:15 -05:00
parent b221d77a6d
commit 9a0cb34c8c
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -286,7 +286,7 @@ def delete_all_by_object_ap_id(id) when is_binary(id) do
|> Queries.by_object_id() |> Queries.by_object_id()
|> Queries.exclude_type("Delete") |> Queries.exclude_type("Delete")
|> select([u], u) |> select([u], u)
|> Repo.delete_all() |> Repo.delete_all(timeout: :infinity)
|> elem(1) |> elem(1)
|> Enum.find(fn |> Enum.find(fn
%{data: %{"type" => "Create", "object" => ap_id}} when is_binary(ap_id) -> ap_id == id %{data: %{"type" => "Create", "object" => ap_id}} when is_binary(ap_id) -> ap_id == id