aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/push
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-08-31 21:58:42 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-08-31 21:58:42 +0300
commitdd017c65a4b86501c435f5cb01804300e6b7c6dd (patch)
tree974377c7e52c8960251881cb939632ea8288dbb6 /lib/pleroma/web/push
parenta90ea8ba1562818b025f677ffeea35f7ca08ddf2 (diff)
downloadpleroma-dd017c65a4b86501c435f5cb01804300e6b7c6dd.tar.gz
[#1149] Refactored Oban workers API (introduced `enqueue/3`).
Diffstat (limited to 'lib/pleroma/web/push')
-rw-r--r--lib/pleroma/web/push/push.ex7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/pleroma/web/push/push.ex b/lib/pleroma/web/push/push.ex
index 4973b529c..7ef1532ac 100644
--- a/lib/pleroma/web/push/push.ex
+++ b/lib/pleroma/web/push/push.ex
@@ -3,13 +3,10 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Push do
- alias Pleroma.Repo
alias Pleroma.Workers.WebPusherWorker
require Logger
- import Pleroma.Workers.WorkerHelper, only: [worker_args: 1]
-
def init do
unless enabled() do
Logger.warn("""
@@ -35,8 +32,6 @@ defmodule Pleroma.Web.Push do
end
def send(notification) do
- %{"op" => "web_push", "notification_id" => notification.id}
- |> WebPusherWorker.new(worker_args(:web_push))
- |> Repo.insert()
+ WebPusherWorker.enqueue("web_push", %{"notification_id" => notification.id})
end
end