logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

helper.ex (419B)


  1. defmodule Pleroma.LoadTesting.Helper do
  2. alias Ecto.Adapters.SQL
  3. alias Pleroma.Repo
  4. def to_sec(microseconds), do: microseconds / 1_000_000
  5. def clean_tables do
  6. IO.puts("Deleting old data...\n")
  7. SQL.query!(Repo, "TRUNCATE users CASCADE;")
  8. SQL.query!(Repo, "TRUNCATE activities CASCADE;")
  9. SQL.query!(Repo, "TRUNCATE objects CASCADE;")
  10. SQL.query!(Repo, "TRUNCATE oban_jobs CASCADE;")
  11. end
  12. end