X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fworkers%2Fbackground_worker.ex;h=57c3a9c3a30c9209683362b4d730523fefc75202;hb=a3bb2e5474ee068bf375b24df8906e51654c9699;hp=ac2fe6946f549d3cbe867dac3002e2481bafa56c;hpb=6813c0302c2b665d337d5f5831d2df6312b6b277;p=akkoma
diff --git a/lib/pleroma/workers/background_worker.ex b/lib/pleroma/workers/background_worker.ex
index ac2fe6946..57c3a9c3a 100644
--- a/lib/pleroma/workers/background_worker.ex
+++ b/lib/pleroma/workers/background_worker.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.BackgroundWorker do
@@ -10,10 +10,6 @@ defmodule Pleroma.Workers.BackgroundWorker do
use Pleroma.Workers.WorkerHelper, queue: "background"
@impl Oban.Worker
- def perform(%{"op" => "fetch_initial_posts", "user_id" => user_id}, _job) do
- user = User.get_cached_by_id(user_id)
- User.perform(:fetch_initial_posts, user)
- end
def perform(%{"op" => "deactivate_user", "user_id" => user_id, "status" => status}, _job) do
user = User.get_cached_by_id(user_id)
@@ -39,7 +35,7 @@ defmodule Pleroma.Workers.BackgroundWorker do
_job
) do
blocker = User.get_cached_by_id(blocker_id)
- User.perform(:blocks_import, blocker, blocked_identifiers)
+ {:ok, User.perform(:blocks_import, blocker, blocked_identifiers)}
end
def perform(
@@ -51,7 +47,7 @@ defmodule Pleroma.Workers.BackgroundWorker do
_job
) do
follower = User.get_cached_by_id(follower_id)
- User.perform(:follow_import, follower, followed_identifiers)
+ {:ok, User.perform(:follow_import, follower, followed_identifiers)}
end
def perform(%{"op" => "media_proxy_preload", "message" => message}, _job) do