projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix digest mix task on OTP releases
[akkoma]
/
lib
/
pleroma
/
web
/
push
/
push.ex
diff --git
a/lib/pleroma/web/push/push.ex
b/lib/pleroma/web/push/push.ex
index b4f0e5127e37518efb603fde9dd1a307017aed65..b80a6438d9e0410e37162f9e411c16cd01e80460 100644
(file)
--- a/
lib/pleroma/web/push/push.ex
+++ b/
lib/pleroma/web/push/push.ex
@@
-1,15
+1,12
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Push do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Push do
- alias Pleroma.Repo
- alias Pleroma.Workers.WebPusher
+ alias Pleroma.Workers.WebPusherWorker
require Logger
require Logger
- defdelegate worker_args(queue), to: Pleroma.Workers.Helper
-
def init do
unless enabled() do
Logger.warn("""
def init do
unless enabled() do
Logger.warn("""
@@
-35,8
+32,6
@@
defmodule Pleroma.Web.Push do
end
def send(notification) do
end
def send(notification) do
- %{"op" => "web_push", "notification_id" => notification.id}
- |> WebPusher.new(worker_args(:web_push))
- |> Repo.insert()
+ WebPusherWorker.enqueue("web_push", %{"notification_id" => notification.id})
end
end
end
end