projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clears `robot.txt` after tests
[akkoma]
/
test
/
support
/
oban_helpers.ex
diff --git
a/test/support/oban_helpers.ex
b/test/support/oban_helpers.ex
index 54b5a95662314a943fa0eecf9e34551235e310f9..72792c0648a89a7f5d9a8df2199dfe74665cf4c5 100644
(file)
--- a/
test/support/oban_helpers.ex
+++ b/
test/support/oban_helpers.ex
@@
-1,16
+1,22
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-201
8
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-201
9
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
# SPDX-License-Identifier: AGPL-3.0-only
-defmodule Pleroma.ObanHelpers do
+defmodule Pleroma.
Tests.
ObanHelpers do
@moduledoc """
Oban test helpers.
"""
alias Pleroma.Repo
@moduledoc """
Oban test helpers.
"""
alias Pleroma.Repo
+ def perform_all do
+ Oban.Job
+ |> Repo.all()
+ |> perform()
+ end
+
def perform(%Oban.Job{} = job) do
def perform(%Oban.Job{} = job) do
- res = apply(String.to_existing_atom("Elixir." <> job.worker), :perform, [job])
+ res = apply(String.to_existing_atom("Elixir." <> job.worker), :perform, [job
.args, job
])
Repo.delete(job)
res
end
Repo.delete(job)
res
end