projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Document deprecation
[akkoma]
/
test
/
support
/
oban_helpers.ex
diff --git
a/test/support/oban_helpers.ex
b/test/support/oban_helpers.ex
index ecc03ba1ab87f23d64ae2b99c69367a9039bdbe1..2468f66dcf7b6051fe0fa14eb5e56a739745680d 100644
(file)
--- a/
test/support/oban_helpers.ex
+++ b/
test/support/oban_helpers.ex
@@
-1,16
+1,23
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
18
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
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.
"""
@moduledoc """
Oban test helpers.
"""
+ require Ecto.Query
+
alias Pleroma.Repo
alias Pleroma.Repo
+ def wipe_all do
+ Repo.delete_all(Oban.Job)
+ end
+
def perform_all do
Oban.Job
def perform_all do
Oban.Job
+ |> Ecto.Query.where(state: "available")
|> Repo.all()
|> perform()
end
|> Repo.all()
|> perform()
end