Merge develop
This commit is contained in:
commit
b6b5b16ba4
86 changed files with 2196 additions and 338 deletions
25
lib/mix/tasks/benchmark.ex
Normal file
25
lib/mix/tasks/benchmark.ex
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
defmodule Mix.Tasks.Pleroma.Benchmark do
|
||||
use Mix.Task
|
||||
alias Mix.Tasks.Pleroma.Common
|
||||
|
||||
def run(["search"]) do
|
||||
Common.start_pleroma()
|
||||
|
||||
Benchee.run(%{
|
||||
"search" => fn ->
|
||||
Pleroma.Web.MastodonAPI.MastodonAPIController.status_search(nil, "cofe")
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
def run(["tag"]) do
|
||||
Common.start_pleroma()
|
||||
|
||||
Benchee.run(%{
|
||||
"tag" => fn ->
|
||||
%{"type" => "Create", "tag" => "cofe"}
|
||||
|> Pleroma.Web.ActivityPub.ActivityPub.fetch_public_activities()
|
||||
end
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
@ -126,7 +126,7 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||
|
||||
proceed? = assume_yes? or Mix.shell().yes?("Continue?")
|
||||
|
||||
unless not proceed? do
|
||||
if proceed? do
|
||||
Common.start_pleroma()
|
||||
|
||||
params = %{
|
||||
|
|
@ -163,7 +163,7 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||
Common.start_pleroma()
|
||||
|
||||
with %User{local: true} = user <- User.get_cached_by_nickname(nickname) do
|
||||
User.delete(user)
|
||||
User.perform(:delete, user)
|
||||
Mix.shell().info("User #{nickname} deleted.")
|
||||
else
|
||||
_ ->
|
||||
|
|
@ -380,7 +380,7 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||
Common.start_pleroma()
|
||||
|
||||
with %User{local: true} = user <- User.get_cached_by_nickname(nickname) do
|
||||
User.delete_user_activities(user)
|
||||
{:ok, _} = User.delete_user_activities(user)
|
||||
Mix.shell().info("User #{nickname} statuses deleted.")
|
||||
else
|
||||
_ ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue