Merge branch 'mailer-queue' into 'develop'
Fix digest email processing, consolidate Oban queues See merge request pleroma/pleroma!3966
This commit is contained in:
commit
11c520607f
1
changelog.d/digest_emails.fix
Normal file
1
changelog.d/digest_emails.fix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix the processing of email digest jobs.
|
@ -590,7 +590,6 @@ config :pleroma, Oban,
|
|||||||
background: 5,
|
background: 5,
|
||||||
remote_fetcher: 2,
|
remote_fetcher: 2,
|
||||||
attachments_cleanup: 1,
|
attachments_cleanup: 1,
|
||||||
new_users_digest: 1,
|
|
||||||
mute_expire: 5
|
mute_expire: 5
|
||||||
],
|
],
|
||||||
plugins: [Oban.Plugins.Pruner],
|
plugins: [Oban.Plugins.Pruner],
|
||||||
|
@ -7,7 +7,7 @@ defmodule Pleroma.Workers.Cron.DigestEmailsWorker do
|
|||||||
The worker to send digest emails.
|
The worker to send digest emails.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
use Oban.Worker, queue: "digest_emails"
|
use Oban.Worker, queue: "mailer"
|
||||||
|
|
||||||
alias Pleroma.Config
|
alias Pleroma.Config
|
||||||
alias Pleroma.Emails
|
alias Pleroma.Emails
|
||||||
|
@ -9,7 +9,7 @@ defmodule Pleroma.Workers.Cron.NewUsersDigestWorker do
|
|||||||
|
|
||||||
import Ecto.Query
|
import Ecto.Query
|
||||||
|
|
||||||
use Pleroma.Workers.WorkerHelper, queue: "new_users_digest"
|
use Pleroma.Workers.WorkerHelper, queue: "mailer"
|
||||||
|
|
||||||
@impl Oban.Worker
|
@impl Oban.Worker
|
||||||
def perform(_job) do
|
def perform(_job) do
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
defmodule Pleroma.Repo.Migrations.ConsolidateEmailQueues do
|
||||||
|
use Ecto.Migration
|
||||||
|
|
||||||
|
def change do
|
||||||
|
execute(
|
||||||
|
"UPDATE oban_jobs SET queue = 'mailer' WHERE queue in ('digest_emails', 'new_users_digest')"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user