projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Documentation: Add warning about database mix tasks.
[akkoma]
/
lib
/
pleroma
/
workers
/
mailer_worker.ex
diff --git
a/lib/pleroma/workers/mailer_worker.ex
b/lib/pleroma/workers/mailer_worker.ex
index 4f73d61bc8b219e559c1bf2f5d1cdf3bbdcfe8b4..1b7a0eb3ea58d6edf333579a75b7f658aef5007e 100644
(file)
--- a/
lib/pleroma/workers/mailer_worker.ex
+++ b/
lib/pleroma/workers/mailer_worker.ex
@@
-3,12
+3,7
@@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.MailerWorker do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.MailerWorker do
- alias Pleroma.User
-
- # Note: `max_attempts` is intended to be overridden in `new/2` call
- use Oban.Worker,
- queue: "mailer",
- max_attempts: 1
+ use Pleroma.Workers.WorkerHelper, queue: "mailer"
@impl Oban.Worker
def perform(%{"op" => "email", "encoded_email" => encoded_email, "config" => config}, _job) do
@impl Oban.Worker
def perform(%{"op" => "email", "encoded_email" => encoded_email, "config" => config}, _job) do
@@
-17,10
+12,4
@@
defmodule Pleroma.Workers.MailerWorker do
|> :erlang.binary_to_term()
|> Pleroma.Emails.Mailer.deliver(config)
end
|> :erlang.binary_to_term()
|> Pleroma.Emails.Mailer.deliver(config)
end
-
- def perform(%{"op" => "digest_email", "user_id" => user_id}, _job) do
- user_id
- |> User.get_cached_by_id()
- |> Pleroma.DigestEmailWorker.perform()
- end
end
end