Pleroma/test/support/jobs_worker_mock.ex

20 lines
510 B
Elixir
Raw Normal View History

2019-01-28 16:17:17 +01:00
# Pleroma: A lightweight social networking server
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Jobs.WorkerMock do
require Logger
def perform(:test_job, arg, arg2) do
Logger.debug({:perform, :test_job, arg, arg2})
end
def perform(:test_job, payload) do
Logger.debug({:perform, :test_job, payload})
end
def test_job(payload) do
Pleroma.Jobs.enqueue(:testing, __MODULE__, [:test_job, payload])
end
end