0b491eabbd629db1d67c09bee05a31b6de401a01
[akkoma] / lib / pleroma / workers / activity_expiration_worker.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Workers.ActivityExpirationWorker do
6 # Note: `max_attempts` is intended to be overridden in `new/2` call
7 use Oban.Worker,
8 queue: "activity_expiration",
9 max_attempts: 1
10
11 @impl Oban.Worker
12 def perform(
13 %{
14 "op" => "activity_expiration",
15 "activity_expiration_id" => activity_expiration_id
16 },
17 _job
18 ) do
19 Pleroma.ActivityExpirationWorker.perform(:execute, activity_expiration_id)
20 end
21 end