Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F13521463
helper.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
419 B
Referenced Files
None
Subscribers
None
helper.ex
View Options
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
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sun, Dec 7, 8:21 PM (8 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
635631
Default Alt Text
helper.ex (419 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment