projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CHANGELOG: Support `poll` notification type
[akkoma]
/
test
/
support
/
oban_helpers.ex
diff --git
a/test/support/oban_helpers.ex
b/test/support/oban_helpers.ex
index e96994c5760e1ad2f3a1830df8bf249e670429c4..9b6e5256e54ca7f981a15a240f0c6b0971a06375 100644
(file)
--- a/
test/support/oban_helpers.ex
+++ b/
test/support/oban_helpers.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Tests.ObanHelpers do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Tests.ObanHelpers do
@@
-7,6
+7,8
@@
defmodule Pleroma.Tests.ObanHelpers do
Oban test helpers.
"""
Oban test helpers.
"""
+ require Ecto.Query
+
alias Pleroma.Repo
def wipe_all do
alias Pleroma.Repo
def wipe_all do
@@
-15,12
+17,13
@@
defmodule Pleroma.Tests.ObanHelpers do
def perform_all do
Oban.Job
def perform_all do
Oban.Job
+ |> Ecto.Query.where(state: "available")
|> Repo.all()
|> perform()
end
def perform(%Oban.Job{} = job) do
|> Repo.all()
|> perform()
end
def perform(%Oban.Job{} = job) do
- res = apply(String.to_existing_atom("Elixir." <> job.worker), :perform, [job
.args, job
])
+ res = apply(String.to_existing_atom("Elixir." <> job.worker), :perform, [job])
Repo.delete(job)
res
end
Repo.delete(job)
res
end