sync with develop

This commit is contained in:
Alexander Strizhakov 2020-02-18 12:19:10 +03:00
commit 1f29ecdcd7
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
6 changed files with 99 additions and 50 deletions

View file

@ -1,8 +1,8 @@
defmodule Mix.Tasks.Pleroma.LoadTesting do
use Mix.Task
import Ecto.Query
import Pleroma.LoadTesting.Helper, only: [clean_tables: 0]
alias Ecto.Adapters.SQL
alias Pleroma.Repo
alias Pleroma.User
@ -63,12 +63,4 @@ defmodule Mix.Tasks.Pleroma.LoadTesting do
Pleroma.LoadTesting.Fetcher.run_benchmarks(user)
end
defp clean_tables do
IO.puts("Deleting old data...\n")
SQL.query!(Repo, "TRUNCATE users CASCADE;")
SQL.query!(Repo, "TRUNCATE activities CASCADE;")
SQL.query!(Repo, "TRUNCATE objects CASCADE;")
SQL.query!(Repo, "TRUNCATE oban_jobs CASCADE;")
end
end