[#1149] Upgraded oban from 0.6.0 to 0.7.1.

This commit is contained in:
Ivan Tashkinov 2019-08-23 09:23:10 +03:00
commit c29686309e
13 changed files with 51 additions and 49 deletions

View file

@ -9,10 +9,10 @@ defmodule Pleroma.Workers.WebPusher do
# Note: `max_attempts` is intended to be overridden in `new/1` call
use Oban.Worker,
queue: "web_push",
max_attempts: Pleroma.Config.get([:workers, :retries, :compile_time_default])
max_attempts: 1
@impl Oban.Worker
def perform(%{"op" => "web_push", "notification_id" => notification_id}) do
def perform(%{"op" => "web_push", "notification_id" => notification_id}, _job) do
notification = Repo.get(Notification, notification_id)
Pleroma.Web.Push.Impl.perform(notification)
end