logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma

jobs_worker_mock.ex (510B)


      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.Jobs.WorkerMock do
      6   require Logger
      7 
      8   def perform(:test_job, arg, arg2) do
      9     Logger.debug({:perform, :test_job, arg, arg2})
     10   end
     11 
     12   def perform(:test_job, payload) do
     13     Logger.debug({:perform, :test_job, payload})
     14   end
     15 
     16   def test_job(payload) do
     17     Pleroma.Jobs.enqueue(:testing, __MODULE__, [:test_job, payload])
     18   end
     19 end