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,3 +1,14 @@
defmodule Pleroma.LoadTesting.Helper do
alias Ecto.Adapters.SQL
alias Pleroma.Repo
def to_sec(microseconds), do: microseconds / 1_000_000
def 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